def _run_worker(): LOG.info('(PID=%s) Actions notifier started.', os.getpid()) actions_notifier = notifier.get_notifier() actions_rescheduler = scheduler.get_rescheduler() try: eventlet.spawn(actions_rescheduler.start) actions_notifier.start(wait=True) except (KeyboardInterrupt, SystemExit): LOG.info('(PID=%s) Actions notifier stopped.', os.getpid()) actions_rescheduler.shutdown() actions_notifier.shutdown() except: return 1 return 0
def _run_worker(): LOG.info('(PID=%s) Actions notifier started.', os.getpid()) actions_notifier = notifier.get_notifier() actions_rescheduler = None try: if cfg.CONF.scheduler.enable: actions_rescheduler = scheduler.get_rescheduler() eventlet.spawn(actions_rescheduler.start) LOG.info(SCHEDULER_ENABLED_LOG_LINE) else: LOG.info(SCHEDULER_DISABLED_LOG_LINE) actions_notifier.start(wait=True) except (KeyboardInterrupt, SystemExit): LOG.info('(PID=%s) Actions notifier stopped.', os.getpid()) if actions_rescheduler: actions_rescheduler.shutdown() actions_notifier.shutdown() return 0