Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 880008c

Browse files
authored
Fix report_lock TTL (#1147)
1 parent d8de5e4 commit 880008c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tasks/upload_finisher.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,14 @@ def invalidate_caches(self, redis_connection, commit: Commit):
375375
def get_report_lock(repoid: int, commitid: str, hard_time_limit: int) -> Lock:
376376
lock_name = UPLOAD_PROCESSING_LOCK_NAME(repoid, commitid)
377377
redis_connection = get_redis_connection()
378+
379+
timeout = 60 * 5
380+
if hard_time_limit:
381+
timeout = max(timeout, hard_time_limit)
382+
378383
return redis_connection.lock(
379384
lock_name,
380-
timeout=max(60 * 5, hard_time_limit),
385+
timeout=timeout,
381386
blocking_timeout=5,
382387
)
383388

0 commit comments

Comments
 (0)