MCPcopy Create free account
hub / github.com/StackStorm/st2 / _run_worker

Function _run_worker

st2reactor/st2reactor/cmd/rulesengine.py:58–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56
57
58def _run_worker():
59 LOG.info("(PID=%s) RulesEngine started.", os.getpid())
60
61 rules_engine_worker = worker.get_worker()
62
63 try:
64 rules_engine_worker.start()
65 return rules_engine_worker.wait()
66 except (KeyboardInterrupt, SystemExit):
67 LOG.info("(PID=%s) RulesEngine stopped.", os.getpid())
68 deregister_service(RULESENGINE)
69 rules_engine_worker.shutdown()
70 except:
71 LOG.exception("(PID:%s) RulesEngine quit due to exception.", os.getpid())
72 return 1
73
74 return 0
75
76
77def main():

Callers 1

mainFunction · 0.70

Calls 4

deregister_serviceFunction · 0.90
startMethod · 0.45
waitMethod · 0.45
shutdownMethod · 0.45

Tested by

no test coverage detected