Reduce waiting time for semaphore

This commit is contained in:
Sebastian Serth
2020-03-22 13:54:23 +01:00
parent ff879d85a1
commit 7137346c03

View File

@ -39,7 +39,7 @@ class DockerContainerPool
def self.acquire_semaphore
Rails.logger.info("Semaphore - Acquire: Trying " + @semaphore.inspect.to_s + " for " + caller_locations(1, 1)[0].label)
got_semaphore = @semaphore.try_acquire(1, 20)
got_semaphore = @semaphore.try_acquire(1, 10)
if got_semaphore
Rails.logger.info("Semaphore - Acquire: Got " + @semaphore.inspect.to_s + " for " + caller_locations(1, 1)[0].label)
else