dynflow 0.8.10 → 0.8.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc004bca5a068a20db3c14f727b365b3ac8784b8
4
- data.tar.gz: c1c95bbb21be8430e2da6f822d77262a0e7f769f
3
+ metadata.gz: 93710eb28bcde8ae7c912b0a93330f4dfa2c6cab
4
+ data.tar.gz: 6a31996ff86af3a4ce6080d1410fc9a63b79b033
5
5
  SHA512:
6
- metadata.gz: 47a908f6fc5b80265d708be96f452450b45de7b8f9f2b63f59e623b162a2f205eebe7d72807d9e09ee10030b3f717293050ab87920ab5e302e990175f0bb9b72
7
- data.tar.gz: 0d166b88b31788c97bb9f8dabb1a94e4a351c9df0123a1777179f0fb4fd2bc681e9f467e2a2e01d36ed736d1d9e45233c1ae069291925ee1708a8e2d0ac95bea
6
+ metadata.gz: 77d32bc910ab7fce6d73b968b9a96915577825803634e69023109d2ad9510a0fd9d9e9e7123200a47035dcf275514b0d7db50fb2fffc11ef316959fd1609177d
7
+ data.tar.gz: c257770350812b06aa98462fec4c902a3c25215c7ebe31ec4c86cd1a0c3048d86dde7155435d78c24c4fe91b7544daaf73539dce5d1f617abc5f09b472ba6d81
data/Rakefile CHANGED
@@ -5,6 +5,7 @@ Rake::TestTask.new do |t|
5
5
  t.libs << 'lib' << 'test'
6
6
  t.test_files = FileList['test/*_test.rb']
7
7
  t.verbose = true
8
+ t.warning = false
8
9
  end
9
10
 
10
11
  desc Rake::Task['test'].comment
@@ -61,13 +61,14 @@ module Dynflow
61
61
  (on Ping.(~any) do |receiver_id|
62
62
  receiver_id
63
63
  end)
64
- request = Envelope[request_id, client_world_id, executor_id, request]
65
- if Dispatcher::UnknownWorld === request.receiver_id
66
- raise Dynflow::Error, "Could not find an executor for #{request}"
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(request).value!
68
+ connector.send(envelope).value!
69
69
  rescue => e
70
- respond(request, Failed[e.message])
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],
@@ -183,7 +183,7 @@ module Dynflow
183
183
  if exclude_owner_id
184
184
  data_set = data_set.exclude(:owner_id => exclude_owner_id)
185
185
  end
186
- data_set.map { |record| load_data(record) }
186
+ data_set.all.map { |record| load_data(record) }
187
187
  end
188
188
 
189
189
  def to_hash
@@ -1,3 +1,3 @@
1
1
  module Dynflow
2
- VERSION = '0.8.10'
2
+ VERSION = '0.8.11'
3
3
  end
@@ -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' => 'pending' }
357
- planned_execution_plans.each { |ep| execute ep.id }
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.10
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-02-15 00:00:00.000000000 Z
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.2.0
531
+ rubygems_version: 2.4.5
532
532
  signing_key:
533
533
  specification_version: 4
534
534
  summary: DYNamic workFLOW engine