Copy the config data to the remote database
(logger, mongo_connector, rm_connector)
| 80 | |
| 81 | |
| 82 | def update_config(logger, mongo_connector, rm_connector): |
| 83 | """ |
| 84 | Copy the config data to the remote database |
| 85 | """ |
| 86 | logger.info("Starting Config..") |
| 87 | config_collection = mongo_connector.get_config_connection() |
| 88 | remote_config_collection = rm_connector.get_config_connection() |
| 89 | |
| 90 | configs = config_collection.find({}, {"_id": 0}) |
| 91 | |
| 92 | remote_config_collection.delete_many({}) |
| 93 | for config in configs: |
| 94 | remote_config_collection.insert_one(config) |
| 95 | |
| 96 | |
| 97 | def update_aws_cidrs(logger, mongo_connector, rm_connector): |
no test coverage detected