From d775038697d1ed60e5f251edf27a35dcc54e3b7d Mon Sep 17 00:00:00 2001 From: Dev Aggarwal Date: Tue, 13 Aug 2024 01:10:47 +0530 Subject: [PATCH] Specify error code in WorkerShutdown exception --- celeryconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/celeryconfig.py b/celeryconfig.py index 16560b3..150caba 100644 --- a/celeryconfig.py +++ b/celeryconfig.py @@ -43,7 +43,7 @@ def init(**kwargs): # for some reason, celery seems to swallow exceptions in init print(f"Error loading {model_id}:") traceback.print_exc() - raise WorkerShutdown() + raise WorkerShutdown(1) init_fns.append(init)