dynflow 0.8.29 → 0.8.30

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: 52093e656e80afba8c3cfef6548c6abb978013af
4
- data.tar.gz: 16d58712d8e3db65deb9f4c5f74a6f44d1fa4e0a
3
+ metadata.gz: d71060f0924aa889e0426c476d6b7cf9366475d3
4
+ data.tar.gz: 6008428d10eff1655d8554526e139a46ec2b68c4
5
5
  SHA512:
6
- metadata.gz: aeb9f630d85d36e9800f85faaaffcae780aa6b00e5783b5a001aa94dbf4eac56ebc9574eeee8115de0aea5c86e3451735e4e57d4e31bf96aaf3bc7f7f8b05a9b
7
- data.tar.gz: ec28ae5dc1222952d5d5676937889e7c2f247f279475c24a6c24656f806d1fff60c78351ef343727af5635defe5dc3936298823e9cb88540ac28b772544bf182
6
+ metadata.gz: bd3c82ba611cb82460817d6c5e3ac985a859b4dfb6499ab11508209e1d87605f4dee57340ac67825fb4ca78c7f49d00b66b71f2d7137d83292595fc4110f42ac
7
+ data.tar.gz: 5fda41ada7581f1601f407cfe093ed6f3e4d902923fdf27dbe6dbcc73a69f18ffcfd5db4afd105d88537e90e7ee38bd546eaed8caa40609b3ce184bb067ab590
@@ -93,6 +93,10 @@ module Dynflow
93
93
  true
94
94
  end
95
95
 
96
+ config_attr :termination_timeout, Numeric do
97
+ 60
98
+ end
99
+
96
100
  config_attr :auto_execute, Algebrick::Types::Boolean do
97
101
  true
98
102
  end
@@ -75,7 +75,7 @@ module Dynflow
75
75
  end
76
76
 
77
77
  def rake_task_with_executor?
78
- return false unless defined?(::Rake)
78
+ return false unless defined?(::Rake) && ::Rake.respond_to?(:application)
79
79
 
80
80
  ::Rake.application.top_level_tasks.any? do |rake_task|
81
81
  rake_tasks_with_executor.include?(rake_task)
@@ -1,3 +1,3 @@
1
1
  module Dynflow
2
- VERSION = '0.8.29'
2
+ VERSION = '0.8.30'
3
3
  end
data/lib/dynflow/world.rb CHANGED
@@ -8,7 +8,7 @@ module Dynflow
8
8
  :transaction_adapter, :logger_adapter, :coordinator,
9
9
  :persistence, :action_classes, :subscription_index,
10
10
  :middleware, :auto_rescue, :clock, :meta, :delayed_executor, :auto_validity_check, :validity_check_timeout, :throttle_limiter,
11
- :terminated, :dead_letter_handler, :execution_plan_cleaner
11
+ :termination_timeout, :terminated, :dead_letter_handler, :execution_plan_cleaner
12
12
 
13
13
  def initialize(config)
14
14
  @id = SecureRandom.uuid
@@ -35,6 +35,7 @@ module Dynflow
35
35
  @validity_check_timeout = config_for_world.validity_check_timeout
36
36
  @throttle_limiter = config_for_world.throttle_limiter
37
37
  @terminated = Concurrent.event
38
+ @termination_timeout = config_for_world.termination_timeout
38
39
  calculate_subscription_index
39
40
 
40
41
  if executor
@@ -217,35 +218,35 @@ module Dynflow
217
218
 
218
219
  if delayed_executor
219
220
  logger.info "start terminating delayed_executor..."
220
- delayed_executor.terminate.wait
221
+ delayed_executor.terminate.wait(termination_timeout)
221
222
  end
222
223
 
223
224
  logger.info "start terminating throttle_limiter..."
224
- throttle_limiter.terminate.wait
225
+ throttle_limiter.terminate.wait(termination_timeout)
225
226
 
226
227
  if executor
227
228
  connector.stop_receiving_new_work(self)
228
229
 
229
230
  logger.info "start terminating executor..."
230
- executor.terminate.wait
231
+ executor.terminate.wait(termination_timeout)
231
232
 
232
233
  logger.info "start terminating executor dispatcher..."
233
234
  executor_dispatcher_terminated = Concurrent.future
234
235
  executor_dispatcher.ask([:start_termination, executor_dispatcher_terminated])
235
- executor_dispatcher_terminated.wait
236
+ executor_dispatcher_terminated.wait(termination_timeout)
236
237
  end
237
238
 
238
239
  logger.info "start terminating client dispatcher..."
239
240
  client_dispatcher_terminated = Concurrent.future
240
241
  client_dispatcher.ask([:start_termination, client_dispatcher_terminated])
241
- client_dispatcher_terminated.wait
242
+ client_dispatcher_terminated.wait(termination_timeout)
242
243
 
243
244
  logger.info "stop listening for new events..."
244
245
  connector.stop_listening(self)
245
246
 
246
247
  if @clock
247
248
  logger.info "start terminating clock..."
248
- clock.ask(:terminate!).wait
249
+ clock.ask(:terminate!).wait(termination_timeout)
249
250
  end
250
251
 
251
252
  coordinator.delete_world(registered_world)
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.29
4
+ version: 0.8.30
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: 2017-09-11 00:00:00.000000000 Z
12
+ date: 2017-09-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json