Merge pull request #3593 from onyx-dot-app/bugfix/primary_worker_lock

the primary worker lock doesn't always exist
This commit is contained in:
rkuo-danswer
2025-01-03 22:01:11 -08:00
committed by GitHub

View File

@@ -335,6 +335,10 @@ def on_worker_shutdown(sender: Any, **kwargs: Any) -> None:
if not celery_is_worker_primary(sender):
return
if not hasattr(sender, "primary_worker_lock"):
# primary_worker_lock will not exist when MULTI_TENANT is True
return
if not sender.primary_worker_lock:
return