Skip to content

Commit f201acd

Browse files
authored
Invert logic for unlock_key (#782)
### Description Please explain the changes you made here. ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] All tests passing - [ ] Extended the documentation, if necessary
1 parent cb82270 commit f201acd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/utils/initialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ async def use_lock_for_workers(
338338

339339
elif unlock_key:
340340
# As an `unlock_key` is provided, we will wait until an other worker has finished executing `job_function`
341-
while redis_client.get(unlock_key) is not None:
341+
while redis_client.get(unlock_key) is None:
342342
logger.debug(f"Waiting for {job_function.__name__} to finish")
343343
await asyncio.sleep(1)
344344

0 commit comments

Comments
 (0)