with Sanic we can launcher a group of workers:
app.run(host='0.0.0.0', port=port, workers=workers)
My question is, how to initialize these workers respectively? I’m using sanic as a micro-service framework, to communicate with other process, and in sanic process, it need to load different extensions to generate data. Questions is, how to let scanic workers load configuration respectively?
for example, if I have a crawler extension, which need to login into web server before it can crawl web pages, how do I pass account/password to extension in different sanic worker process?
Usually I should use ‘before_server_start’ listener to do the initialization, but seems like it will do the initialization for all workers.