()
| 63 | |
| 64 | |
| 65 | def 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 | |
| 82 | def teardown(): |
no test coverage detected