lib/floe/workflow.rb in floe-0.13.1 vs lib/floe/workflow.rb in floe-0.14.0
- old
+ new
@@ -61,13 +61,15 @@
end
end
loop do
# Block until an event is raised
- event, runner_context = queue.pop
+ event, data = queue.pop
break if event.nil?
+ _execution_id, runner_context = data.values_at("execution_id", "runner_context")
+
# If the event is for one of our workflows set the updated runner_context
workflows.each do |workflow|
next unless workflow.context.state.dig("RunnerContext", "container_ref") == runner_context["container_ref"]
workflow.context.state["RunnerContext"] = runner_context
@@ -173,10 +175,10 @@
context.state["Name"] = start_at
context.state["Input"] = context.execution["Input"].dup
context.state["Guid"] = SecureRandom.uuid
- context.execution["Id"] = SecureRandom.uuid
+ context.execution["Id"] ||= SecureRandom.uuid
context.execution["StartTime"] = Time.now.utc.iso8601
self
end