Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
guyu committed Jan 24, 2025
1 parent f841b21 commit 06c9a2b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions redash/utils/locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ def release_lock(name, identifier):
logger.info("Lock released successfully, lock_name=[%s], identifier=[%s]", lock_name, identifier)
return True
pipe.unwatch()
logger.warning("Lock not owned by this identifier, lock_name=[%s], identifier=[%s]", lock_name,
identifier)
logger.warning(
"Lock not owned by this identifier, lock_name=[%s], identifier=[%s]", lock_name, identifier
)
break
except WatchError:
logger.warning("WatchError occurred, retrying lock release, lock_name=[%s], identifier=[%s]", lock_name,
identifier)
logger.warning(
"WatchError occurred, retrying lock release, lock_name=[%s], identifier=[%s]",
lock_name,
identifier,
)
except Exception as e:
logger.error("Error releasing lock: %s", str(e))
break
Expand Down

0 comments on commit 06c9a2b

Please sign in to comment.