From d35099fa9b72c553df6d75c771e32a87b988eed2 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 2 Jun 2021 13:24:18 -0400 Subject: [PATCH] island: Rename MongoDbRunner -> MongoDbProcess --- .../mongo/{mongo_process_runner.py => mongo_db_process.py} | 4 ++-- monkey/monkey_island/cc/setup/mongo/mongo_setup.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename monkey/monkey_island/cc/setup/mongo/{mongo_process_runner.py => mongo_db_process.py} (93%) diff --git a/monkey/monkey_island/cc/setup/mongo/mongo_process_runner.py b/monkey/monkey_island/cc/setup/mongo/mongo_db_process.py similarity index 93% rename from monkey/monkey_island/cc/setup/mongo/mongo_process_runner.py rename to monkey/monkey_island/cc/setup/mongo/mongo_db_process.py index d03b62913..4b0150d99 100644 --- a/monkey/monkey_island/cc/setup/mongo/mongo_process_runner.py +++ b/monkey/monkey_island/cc/setup/mongo/mongo_db_process.py @@ -13,7 +13,7 @@ DB_DIR_PARAM = "--dbpath" MONGO_LOG_FILENAME = "mongo_log.txt" -class MongoDbRunner: +class MongoDbProcess: def __init__(self, db_dir_parent_path: str, logging_dir_path: str): """ @param db_dir_parent_path: Path where a folder for database contents will be created @@ -35,7 +35,7 @@ class MongoDbRunner: def _start_mongodb_process(self, db_dir_path: str): logger.info("Starting MongoDb process.") - mongo_run_cmd = MongoDbRunner._build_mongo_launch_cmd(MONGO_EXECUTABLE_PATH, db_dir_path) + mongo_run_cmd = MongoDbProcess._build_mongo_launch_cmd(MONGO_EXECUTABLE_PATH, db_dir_path) logger.info(f"Mongodb will be launched with command: {' '.join(mongo_run_cmd)}.") mongo_log_path = os.path.join(self.logging_dir_path, MONGO_LOG_FILENAME) diff --git a/monkey/monkey_island/cc/setup/mongo/mongo_setup.py b/monkey/monkey_island/cc/setup/mongo/mongo_setup.py index d5001dd1b..5accd6f65 100644 --- a/monkey/monkey_island/cc/setup/mongo/mongo_setup.py +++ b/monkey/monkey_island/cc/setup/mongo/mongo_setup.py @@ -6,7 +6,7 @@ import time from monkey_island.cc.database import get_db_version, is_db_server_up from monkey_island.cc.setup.mongo import mongo_connector from monkey_island.cc.setup.mongo.mongo_connector import MONGO_DB_HOST, MONGO_DB_NAME, MONGO_DB_PORT -from monkey_island.cc.setup.mongo.mongo_process_runner import MongoDbRunner +from monkey_island.cc.setup.mongo.mongo_db_process import MongoDbProcess from monkey_island.setup.island_config_options import IslandConfigOptions MONGO_URL = os.environ.get( @@ -20,7 +20,7 @@ logger = logging.getLogger(__name__) def start_mongodb(config_options: IslandConfigOptions): if config_options.start_mongodb: - MongoDbRunner( + MongoDbProcess( db_dir_parent_path=config_options.data_dir, logging_dir_path=config_options.data_dir ).launch_mongodb() wait_for_mongo_db_server(MONGO_URL)