Disable semaphore.

This commit is contained in:
Sebastian Serth
2020-03-22 16:07:15 +01:00
parent 2d52338008
commit 4e9df310c2

View File

@ -38,6 +38,7 @@ class DockerContainerPool
end
def self.acquire_semaphore
return
Rails.logger.info("Semaphore - Acquire: Trying " + @semaphore.inspect.to_s + " for " + caller_locations(1, 1)[0].label)
got_semaphore = @semaphore.try_acquire(1, 10)
if got_semaphore
@ -48,6 +49,7 @@ class DockerContainerPool
end
def self.release_semaphore
return
Rails.logger.info("Semaphore - Release: Trying " + @semaphore.inspect.to_s + " for " + caller_locations(1, 1)[0].label)
if @semaphore.available_permits < 1
@semaphore.release