def run(): arguments = argument_parsing() logging_setup(arguments=arguments) config = get_configuration('default') updater_class = get_backend_class(config, 'updaterbackend') messaging = get_backend_class(config=config, key='messagingbackend') updater = updater_class(config=config, messaging=messaging) signal.signal(signal.SIGTERM, updater.stop) signal.signal(signal.SIGHUP, updater.stop) signal.signal(signal.SIGINT, updater.stop) updater.start()
def run(): arguments = argument_parsing() logging_setup(arguments=arguments) if arguments.config: config_manager._CONFIG_FILE = arguments.config if arguments.envfile: config_manager._VARIABLES_FILE = arguments.envfile config = dict() config['persistence'] = config_manager.get_configuration('persistence') config['messaging'] = config_manager.get_configuration('messaging') updater = Updater(config=config) signal.signal(signal.SIGTERM, updater.stop) signal.signal(signal.SIGHUP, updater.stop) signal.signal(signal.SIGINT, updater.stop) updater.start()
def run(): arguments = argument_parsing() logging_setup(arguments=arguments) if arguments.config: config_manager._CONFIG_FILE = arguments.config if arguments.envfile: config_manager._VARIABLES_FILE = arguments.envfile config = dict() config["persistence"] = config_manager.get_configuration("persistence") config["messaging"] = config_manager.get_configuration("messaging") updater = Updater(config=config) signal.signal(signal.SIGTERM, updater.stop) signal.signal(signal.SIGHUP, updater.stop) signal.signal(signal.SIGINT, updater.stop) updater.start()