diff --git a/bin/core/ail_2_ail_server.py b/bin/core/ail_2_ail_server.py index a662e981..6a49b7d9 100755 --- a/bin/core/ail_2_ail_server.py +++ b/bin/core/ail_2_ail_server.py @@ -17,6 +17,12 @@ sys.path.append(os.environ['AIL_BIN']) ################################## from pubsublogger import publisher from core import ail_2_ail +from lib.ConfigLoader import ConfigLoader + +config_loader = ConfigLoader() +host = config_loader.get_config_str('AIL_2_AIL', 'server_host') +port = config_loader.get_config_int('AIL_2_AIL', 'server_port') +config_loader = None # # TODO: refactor logging #### LOGS #### @@ -303,9 +309,6 @@ class AIL_2_AIL_Protocol(websockets.WebSocketServerProtocol): if __name__ == '__main__': - host = '0.0.0.0' - port = 4443 - print('Launching Server...') redis_logger.info('Launching Server...') diff --git a/configs/core.cfg.sample b/configs/core.cfg.sample index 705b648e..e0100533 100644 --- a/configs/core.cfg.sample +++ b/configs/core.cfg.sample @@ -57,6 +57,10 @@ minute_processed_paste = 10 #Maximum line length authorized to make a diff between duplicates DiffMaxLineLength = 10000 +[AIL_2_AIL] +server_host = 0.0.0.0 +server_port = 4443 + #### Modules #### [BankAccount] max_execution_time = 60