Handle Faraday errors
This commit is contained in:

committed by
Sebastian Serth

parent
b48b45de9f
commit
1d3f0d7ad8
@ -51,6 +51,9 @@ class ExecutionEnvironment < ApplicationRecord
|
||||
|
||||
Rails.logger.warn("Could not create execution environment in Poseidon, got response: #{response.as_json}")
|
||||
false
|
||||
rescue Faraday::Error => e
|
||||
Rails.logger.warn("Could not create execution environment because of Faraday error: #{e.inspect}")
|
||||
false
|
||||
end
|
||||
|
||||
def to_json(*_args)
|
||||
|
@ -197,7 +197,7 @@ class Submission < ApplicationRecord
|
||||
runner = Runner.for(user, exercise)
|
||||
copy_files_to runner
|
||||
waiting_duration = Time.zone.now - request_time
|
||||
yield(runner, waiting_duration) if block_given?
|
||||
yield(runner, waiting_duration)
|
||||
end
|
||||
|
||||
def command_for(template, file)
|
||||
|
Reference in New Issue
Block a user