Skip to content

Commit

Permalink
fix bug in validation logic (#3915)
Browse files Browse the repository at this point in the history
* fix bug in validation logic

* test

---------

Co-authored-by: Richard Kuo (Danswer) <rkuo@onyx.app>
  • Loading branch information
rkuo-danswer and Richard Kuo (Danswer) authored Feb 5, 2025
1 parent 29f5f4e commit 47e6192
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,8 @@ def validate_permission_sync_fence(
f"tasks_scanned={tasks_scanned} tasks_not_in_celery={tasks_not_in_celery}"
)

if tasks_not_in_celery == 0:
# we're only active if tasks_scanned > 0 and tasks_not_in_celery == 0
if tasks_scanned > 0 and tasks_not_in_celery == 0:
redis_connector.permissions.set_active()
return

Expand Down

0 comments on commit 47e6192

Please sign in to comment.