forked from p15670423/monkey
Added init of AwsService to beginning of server lifetime
This commit is contained in:
parent
7f0418f91b
commit
1965180487
|
@ -29,6 +29,7 @@ from monkey_island.cc.resources.telemetry import Telemetry
|
|||
from monkey_island.cc.resources.telemetry_feed import TelemetryFeed
|
||||
from monkey_island.cc.services.config import ConfigService
|
||||
from monkey_island.cc.consts import MONKEY_ISLAND_ABS_PATH
|
||||
from monkey_island.cc.services.remote_run_aws import RemoteRunAwsService
|
||||
|
||||
__author__ = 'Barak'
|
||||
|
||||
|
@ -98,6 +99,9 @@ def init_app(mongo_url):
|
|||
database.init()
|
||||
ConfigService.init_config()
|
||||
|
||||
# If on AWS, this will set the instance - for usage later in the code.
|
||||
RemoteRunAwsService.init()
|
||||
|
||||
app.add_url_rule('/', 'serve_home', serve_home)
|
||||
app.add_url_rule('/<path:static_path>', 'serve_static_file', serve_static_file)
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
def populate_exporter_list():
|
||||
manager = ReportExporterManager()
|
||||
RemoteRunAwsService.init()
|
||||
if RemoteRunAwsService.is_running_on_aws():
|
||||
manager.add_exporter_to_list(AWSExporter)
|
||||
|
||||
|
|
Loading…
Reference in New Issue