Skip to content

Commit

Permalink
Fix timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jakep-allenai committed Nov 14, 2024
1 parent 8e16780 commit 06331d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pdelfin/beakerpipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,8 @@ async def process_line(line):

last_queue_req = queue_req

# And have a semaphore release automatically if there are no running requests for > 30 seconds
if last_running_req == 0 and can_release_automatically and time.time() - last_semaphore_release > 30 and semaphore.locked():
# And have a semaphore release automatically if there are no queued requests for > 30 seconds
if last_queue_req == 0 and can_release_automatically and time.time() - last_semaphore_release > 30 and semaphore.locked():
semaphore.release()
last_semaphore_release = time.time()
can_release_automatically = False
Expand Down

0 comments on commit 06331d7

Please sign in to comment.