Add release and pool_size methods to DCP
This commit is contained in:
@ -7,8 +7,15 @@ module Admin
|
||||
end
|
||||
|
||||
def docker_data
|
||||
pool_size = begin
|
||||
Runner.strategy_class.pool_size
|
||||
rescue Runner::Error => e
|
||||
Rails.logger.debug { "Runner error while fetching current pool size: #{e.message}" }
|
||||
[]
|
||||
end
|
||||
|
||||
ExecutionEnvironment.order(:id).select(:id, :pool_size).map do |execution_environment|
|
||||
execution_environment.attributes.merge(quantity: DockerContainerPool.quantities[execution_environment.id])
|
||||
execution_environment.attributes.merge(quantity: pool_size[execution_environment.id])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user