lifecycle: revert to non-h11 worker
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
20bc38a54b
commit
cf5e70c759
|
@ -13,6 +13,7 @@ from django.db import InternalError, OperationalError, ProgrammingError
|
||||||
from django.http.response import Http404
|
from django.http.response import Http404
|
||||||
from django_redis.exceptions import ConnectionInterrupted
|
from django_redis.exceptions import ConnectionInterrupted
|
||||||
from docker.errors import DockerException
|
from docker.errors import DockerException
|
||||||
|
from h11 import LocalProtocolError
|
||||||
from ldap3.core.exceptions import LDAPException
|
from ldap3.core.exceptions import LDAPException
|
||||||
from redis.exceptions import ConnectionError as RedisConnectionError
|
from redis.exceptions import ConnectionError as RedisConnectionError
|
||||||
from redis.exceptions import RedisError, ResponseError
|
from redis.exceptions import RedisError, ResponseError
|
||||||
|
@ -72,6 +73,7 @@ def before_send(event: dict, hint: dict) -> Optional[dict]:
|
||||||
# websocket errors
|
# websocket errors
|
||||||
ChannelFull,
|
ChannelFull,
|
||||||
WebSocketException,
|
WebSocketException,
|
||||||
|
LocalProtocolError,
|
||||||
# rest_framework error
|
# rest_framework error
|
||||||
APIException,
|
APIException,
|
||||||
# celery errors
|
# celery errors
|
||||||
|
|
|
@ -16,7 +16,7 @@ try:
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
worker_class = "uvicorn.workers.UvicornH11Worker"
|
worker_class = "uvicorn.workers.UvicornWorker"
|
||||||
# Docker containers don't have /tmp as tmpfs
|
# Docker containers don't have /tmp as tmpfs
|
||||||
if os.path.exists("/dev/shm"): # nosec
|
if os.path.exists("/dev/shm"): # nosec
|
||||||
worker_tmp_dir = "/dev/shm" # nosec
|
worker_tmp_dir = "/dev/shm" # nosec
|
||||||
|
|
Reference in New Issue