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

Function run_server

st2actions/st2actions/cmd/workflow_engine.py:65–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63
64
65def run_server():
66 LOG.info("(PID=%s) Workflow engine started.", os.getpid())
67
68 engine = workflows.get_engine()
69 setup_sigterm_handler(engine)
70 try:
71 engine.start(wait=True)
72 except (KeyboardInterrupt, SystemExit):
73 LOG.info("(PID=%s) Workflow engine stopped.", os.getpid())
74 deregister_service(service=workflows.WORKFLOW_ENGINE)
75 engine.shutdown()
76 except:
77 LOG.exception("(PID=%s) Workflow engine unexpectedly stopped.", os.getpid())
78 return 1
79 return 0
80
81
82def teardown():

Callers 1

mainFunction · 0.85

Calls 4

deregister_serviceFunction · 0.90
setup_sigterm_handlerFunction · 0.85
startMethod · 0.45
shutdownMethod · 0.45

Tested by

no test coverage detected