Skip to content

Commit

Permalink
Specify error code in WorkerShutdown exception
Browse files Browse the repository at this point in the history
  • Loading branch information
devxpy committed Aug 12, 2024
1 parent 6829a49 commit d775038
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion celeryconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit d775038

Please sign in to comment.