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

Function main

st2stream/st2stream/cmd/api.py:112–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110
111
112def main():
113 try:
114 _setup()
115 return _run_server()
116 except SystemExit as exit_code:
117 deregister_service(STREAM)
118 sys.exit(exit_code)
119 except KeyboardInterrupt:
120 deregister_service(STREAM)
121 listener = get_listener_if_set(name="stream")
122
123 if listener:
124 listener.shutdown()
125 except Exception:
126 LOG.exception("(PID=%s) ST2 Stream API quit due to exception.", os.getpid())
127 return 1
128 finally:
129 _teardown()

Callers

nothing calls this directly

Calls 6

deregister_serviceFunction · 0.90
get_listener_if_setFunction · 0.90
_setupFunction · 0.70
_run_serverFunction · 0.70
_teardownFunction · 0.70
shutdownMethod · 0.45

Tested by

no test coverage detected