Introduce strategy for runner behavior
The runner model is only a class responsible for storing information now. Based on the configuration it picks a strategy for the runner management. The Poseidon strategy is already implemented and tested. The Docker strategy will follow.
This commit is contained in:

committed by
Sebastian Serth

parent
cf58be97ee
commit
d0d1b1bffd
24
lib/runner/strategy.rb
Normal file
24
lib/runner/strategy.rb
Normal file
@ -0,0 +1,24 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Runner::Strategy
|
||||
def initialize(runner_id, environment)
|
||||
@runner_id = runner_id
|
||||
@execution_environment = environment
|
||||
end
|
||||
|
||||
def self.request_from_management
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
||||
def destroy_at_management
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
||||
def copy_files(_files)
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
||||
def attach_to_execution(_command)
|
||||
raise NotImplementedError
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user