Fix specs

This commit is contained in:
Sebastian Serth
2020-04-14 15:20:15 +02:00
parent 520a62125e
commit 28d40605c8
4 changed files with 13 additions and 160 deletions

View File

@ -248,12 +248,13 @@ class DockerClient
Rails.logger.error('No further actions are done concerning that.')
end
#currently only used to check if containers have been started correctly, or other internal checks
# currently only used to check if containers have been started correctly, or other internal checks
# also used for the admin shell to any container
def execute_arbitrary_command(command, &block)
execute_command(command, nil, block)
end
#only used by score
# only used by score and execute_arbitrary_command
def execute_command(command, before_execution_block, output_consuming_block)
#tries ||= 0
container_request_time = Time.now

View File

@ -52,9 +52,16 @@ class DockerContainerPool
def self.quantities
response = JSON.parse(Faraday.get(config[:location] + "/docker_container_pool/quantities").body)
response.transform_keys(&:to_i)
rescue StandardError => e
Raven.extra_context({response: response.inspect})
Raven.capture_exception(e)
[]
end
def self.dump_info
JSON.parse(Faraday.get(config[:location] + "/docker_container_pool/dump_info").body)
rescue StandardError => e
Raven.capture_exception(e)
nil
end
end