mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-10 05:05:34 +02:00
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:
@@ -335,6 +335,10 @@ def on_worker_shutdown(sender: Any, **kwargs: Any) -> None:
|
|||||||
if not celery_is_worker_primary(sender):
|
if not celery_is_worker_primary(sender):
|
||||||
return
|
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:
|
if not sender.primary_worker_lock:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user