Island: Register Deployment as instance, not convention

This commit is contained in:
Mike Salvatore 2022-08-03 13:33:29 -04:00
parent 582bc46f8c
commit 449207876f
1 changed files with 1 additions and 3 deletions

View File

@ -62,6 +62,7 @@ def initialize_services(data_dir: Path) -> DIContainer:
container = DIContainer()
_register_conventions(container, data_dir)
container.register_instance(Deployment, _get_depyloyment_from_file(DEPLOYMENT_FILE_PATH))
container.register_instance(AWSInstance, AWSInstance())
container.register_instance(MongoClient, MongoClient(MONGO_URL, serverSelectionTimeoutMS=100))
container.register_instance(
@ -94,9 +95,6 @@ def _register_conventions(container: DIContainer, data_dir: Path):
DEFAULT_RANSOMWARE_AGENT_CONFIGURATION,
)
container.register_convention(Path, "island_log_file_path", get_log_file_path(data_dir))
container.register_convention(
Deployment, "deployment", _get_depyloyment_from_file(DEPLOYMENT_FILE_PATH)
)
container.register_convention(str, "version_number", get_version())