Sha256: a8509aca3d4c39bcef391e87d01b00f002091ca142fa1c4a92ca358536299052
Contents?: true
Size: 803 Bytes
Versions: 51
Compression:
Stored size: 803 Bytes
Contents
module Dynflow module Testing class DummyExecutor attr_reader :world def initialize(world) @world = world @events_to_process = [] end def event(execution_plan_id, step_id, event, future = Concurrent.future) @events_to_process << [execution_plan_id, step_id, event, future] end # returns true if some event was processed. def progress events = @events_to_process.dup clear events.each do |execution_plan_id, step_id, event, future| future.success true if event && world.action.state != :suspended return false end world.action.execute event end end def clear @events_to_process.clear end end end end
Version data entries
51 entries across 51 versions & 1 rubygems