Ability to add custom worker processed managed by Sanic
Tronic opened this issue · comments
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe.
Suggesting an easy facility to have the main process start app processes and restart them on server restart (perhaps optionally).
Describe the solution you'd like
@app.worker_process
def worker(app):
...
Additional context
Process termination, graceful restarts etc. might need something more that should then also be handled by Sanic. These would need to be started and managed even when using Sanic.serve_single()
.