lifecycle: use custom worker class
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
13
lifecycle/worker.py
Normal file
13
lifecycle/worker.py
Normal file
@ -0,0 +1,13 @@
|
||||
"""Uvicorn worker"""
|
||||
from uvicorn.workers import UvicornWorker
|
||||
|
||||
|
||||
class DjangoUvicornWorker(UvicornWorker):
|
||||
"""Custom configured Uvicorn Worker without lifespan"""
|
||||
|
||||
CONFIG_KWARGS = {
|
||||
"loop": "uvloop",
|
||||
"http": "httptools",
|
||||
"lifespan": "off",
|
||||
"ws": "wsproto",
|
||||
}
|
Reference in New Issue
Block a user