dynflow 0.8.10 → 0.8.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +1 -0
- data/lib/dynflow/dispatcher/client_dispatcher.rb +9 -5
- data/lib/dynflow/execution_plan.rb +4 -0
- data/lib/dynflow/persistence_adapters/sequel.rb +1 -1
- data/lib/dynflow/version.rb +1 -1
- data/lib/dynflow/world.rb +2 -2
- data/test/abnormal_states_recovery_test.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93710eb28bcde8ae7c912b0a93330f4dfa2c6cab
|
4
|
+
data.tar.gz: 6a31996ff86af3a4ce6080d1410fc9a63b79b033
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77d32bc910ab7fce6d73b968b9a96915577825803634e69023109d2ad9510a0fd9d9e9e7123200a47035dcf275514b0d7db50fb2fffc11ef316959fd1609177d
|
7
|
+
data.tar.gz: c257770350812b06aa98462fec4c902a3c25215c7ebe31ec4c86cd1a0c3048d86dde7155435d78c24c4fe91b7544daaf73539dce5d1f617abc5f09b472ba6d81
|
data/Rakefile
CHANGED
@@ -61,13 +61,14 @@ module Dynflow
|
|
61
61
|
(on Ping.(~any) do |receiver_id|
|
62
62
|
receiver_id
|
63
63
|
end)
|
64
|
-
|
65
|
-
if Dispatcher::UnknownWorld ===
|
66
|
-
raise Dynflow::Error, "Could not find an executor for #{
|
64
|
+
envelope = Envelope[request_id, client_world_id, executor_id, request]
|
65
|
+
if Dispatcher::UnknownWorld === envelope.receiver_id
|
66
|
+
raise Dynflow::Error, "Could not find an executor for #{envelope}"
|
67
67
|
end
|
68
|
-
connector.send(
|
68
|
+
connector.send(envelope).value!
|
69
69
|
rescue => e
|
70
|
-
|
70
|
+
log(Logger::ERROR, e)
|
71
|
+
respond(envelope, Failed[e.message]) if envelope
|
71
72
|
end
|
72
73
|
|
73
74
|
def dispatch_response(envelope)
|
@@ -94,6 +95,9 @@ module Dynflow
|
|
94
95
|
else
|
95
96
|
Dispatcher::UnknownWorld
|
96
97
|
end
|
98
|
+
rescue => e
|
99
|
+
log(Logger::ERROR, e)
|
100
|
+
Dispatcher::UnknownWorld
|
97
101
|
end
|
98
102
|
|
99
103
|
def track_request(finished, request, timeout)
|
@@ -19,6 +19,10 @@ module Dynflow
|
|
19
19
|
@states ||= [:pending, :scheduled, :planning, :planned, :running, :paused, :stopped]
|
20
20
|
end
|
21
21
|
|
22
|
+
def self.results
|
23
|
+
@results ||= [:pending, :success, :warning, :error]
|
24
|
+
end
|
25
|
+
|
22
26
|
def self.state_transitions
|
23
27
|
@state_transitions ||= { pending: [:stopped, :scheduled, :planning],
|
24
28
|
scheduled: [:planning, :stopped],
|
data/lib/dynflow/version.rb
CHANGED
data/lib/dynflow/world.rb
CHANGED
@@ -353,8 +353,8 @@ module Dynflow
|
|
353
353
|
def auto_execute
|
354
354
|
coordinator.acquire(Coordinator::AutoExecuteLock.new(self)) do
|
355
355
|
planned_execution_plans =
|
356
|
-
self.persistence.find_execution_plans filters: { 'state' => %w(planned paused), 'result' =>
|
357
|
-
planned_execution_plans.
|
356
|
+
self.persistence.find_execution_plans filters: { 'state' => %w(planned paused), 'result' => (ExecutionPlan.results - [:error]).map(&:to_s) }
|
357
|
+
planned_execution_plans.map { |ep| execute ep.id }
|
358
358
|
end
|
359
359
|
end
|
360
360
|
|
@@ -139,7 +139,8 @@ module Dynflow
|
|
139
139
|
executor_world # mention it to get initialized
|
140
140
|
triggered = client_world.trigger(Support::DummyExample::FailingDummy)
|
141
141
|
triggered.finished.wait
|
142
|
-
executor_world.auto_execute
|
142
|
+
retries = executor_world.auto_execute
|
143
|
+
retries.each(&:wait)
|
143
144
|
plan = client_world.persistence.load_execution_plan(triggered.id)
|
144
145
|
plan.state.must_equal :paused
|
145
146
|
expected_history = [['start execution', executor_world.id],
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Necas
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-05-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -528,7 +528,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
528
528
|
version: '0'
|
529
529
|
requirements: []
|
530
530
|
rubyforge_project:
|
531
|
-
rubygems_version: 2.
|
531
|
+
rubygems_version: 2.4.5
|
532
532
|
signing_key:
|
533
533
|
specification_version: 4
|
534
534
|
summary: DYNamic workFLOW engine
|