diff --git a/src/sentry/models/releases/set_commits.py b/src/sentry/models/releases/set_commits.py index 95ba78a014613c..7f46e10b3a3619 100644 --- a/src/sentry/models/releases/set_commits.py +++ b/src/sentry/models/releases/set_commits.py @@ -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