Akashdeep Dhar
Akashdeep Dhar

Reputation: 33

How do I run a Gunicorn server with a worker class from a Python code?

I used to run a certain application with a shell script having the following contents.

gunicorn someapp.server:init_app --bind 0.0.0.0:8080 --worker-class aiohttp.GunicornUVLoopWebWorker

In order to make sure that the application is configurable in nature (with respect to changing hosts, ports, log levels, log formats etc.), I wish to ensure that the Gunicorn server can be run from a Python code.

How can I do so?

Upvotes: 2

Views: 255

Answers (0)

Related Questions