Skip to content

Commit

Permalink
fix(releases): increase lock to 10 minutes on set_commits
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshFerge committed Sep 17, 2024
1 parent 9549192 commit 2cbce26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sentry/models/releases/set_commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ def set_commits(release, commit_list):
commit_list = [
c for c in commit_list if not RepositoryProvider.should_ignore_commit(c.get("message", ""))
]
lock_key = type(release).get_lock_key(release.organization_id, release.id)
lock = locks.get(lock_key, duration=10, name="release_set_commits")
lock_key = release.get_lock_key(release.organization_id, release.id)
# Acquire the lock for a maximum of 10 minutes
lock = locks.get(lock_key, duration=10 * 60, name="release_set_commits")
if lock.locked():
# Signal failure to the consumer rapidly. This aims to prevent the number
# of timeouts and prevent web worker exhaustion when customers create
Expand Down

0 comments on commit 2cbce26

Please sign in to comment.