dynflow 1.8.0 → 1.8.2
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/dynflow.gemspec +1 -1
- data/examples/remote_executor.rb +4 -3
- data/lib/dynflow/action/v2/with_sub_plans.rb +2 -1
- data/lib/dynflow/executors/sidekiq/core.rb +1 -1
- data/lib/dynflow/rails/configuration.rb +4 -4
- data/lib/dynflow/version.rb +1 -1
- data/lib/dynflow.rb +1 -1
- data/web/assets/vendor/jquery/jquery.js +7942 -7033
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4db626bf7deb1705c684ec0a1e4a0f55326129f94513076d0bd6eda7a8b61e7
|
4
|
+
data.tar.gz: 006b0a3e56c17c8c827f7375e761d1f47608b586d5fdbaaa3a16bc220b8879d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cb9a7044648545e5da5f1be5452d3170a1be2077207ccc83b85c2fd59523851bbe4a2e3cdef484cf6f02c41b82357373de11c4d41b7fb13802be0d1a49aa2c7
|
7
|
+
data.tar.gz: 91cb66bfddeb1044c52f2959d7c1d3f3e4ff4bf5b44dfa938ae1d48d07650e6a6c9169f9db6ab73ba0bf79d9bd0ce41235c6b1aecedc322a56f784466fa4bc05
|
data/dynflow.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
|
30
30
|
s.add_development_dependency "rake"
|
31
31
|
s.add_development_dependency "rack-test"
|
32
|
-
s.add_development_dependency "minitest"
|
32
|
+
s.add_development_dependency "minitest", "< 5.19"
|
33
33
|
s.add_development_dependency "minitest-reporters"
|
34
34
|
s.add_development_dependency "minitest-stub-const"
|
35
35
|
s.add_development_dependency "activerecord"
|
data/examples/remote_executor.rb
CHANGED
@@ -168,10 +168,11 @@ elsif defined?(Sidekiq)
|
|
168
168
|
Sidekiq.default_worker_options = { :retry => 0, 'backtrace' => true }
|
169
169
|
# assuming the remote executor was required as part of initialization
|
170
170
|
# of the ActiveJob worker
|
171
|
-
|
171
|
+
queues = Sidekiq.configure_server { |c| c.options[:queues] }
|
172
|
+
world = if queues.include?("dynflow_orchestrator")
|
172
173
|
RemoteExecutorExample.initialize_sidekiq_orchestrator
|
173
|
-
elsif (
|
174
|
+
elsif (queues - ['dynflow_orchestrator']).any?
|
174
175
|
RemoteExecutorExample.initialize_sidekiq_worker
|
175
176
|
end
|
176
|
-
Sidekiq.options[:dynflow_world] = world
|
177
|
+
Sidekiq.configure_server { |c| c.options[:dynflow_world] = world }
|
177
178
|
end
|
@@ -130,7 +130,7 @@ module Dynflow::Action::V2
|
|
130
130
|
|
131
131
|
def recalculate_counts
|
132
132
|
total = total_count
|
133
|
-
failed = sub_plans_count('state' => %w(paused stopped), 'result' =>
|
133
|
+
failed = sub_plans_count('state' => %w(paused stopped), 'result' => %w(error warning))
|
134
134
|
success = sub_plans_count('state' => 'stopped', 'result' => 'success')
|
135
135
|
output.update(:pending_count => total - failed - success,
|
136
136
|
:failed_count => failed - output.fetch(:resumed_count, 0),
|
@@ -173,6 +173,7 @@ module Dynflow::Action::V2
|
|
173
173
|
def cancel!(force = false)
|
174
174
|
# Count the not-yet-planned tasks as cancelled
|
175
175
|
output[:cancelled_count] = total_count - output[:planned_count]
|
176
|
+
on_planning_finished if output[:cancelled_count].positive?
|
176
177
|
# Pass the cancel event to running sub plans if they can be cancelled
|
177
178
|
sub_plans(:state => 'running').each { |sub_plan| sub_plan.cancel(force) if sub_plan.cancellable? }
|
178
179
|
suspend
|
@@ -9,7 +9,7 @@ require 'sidekiq-reliable-fetch'
|
|
9
9
|
Sidekiq.configure_server do |config|
|
10
10
|
# Use semi-reliable fetch
|
11
11
|
# for details see https://gitlab.com/gitlab-org/sidekiq-reliable-fetch/blob/master/README.md
|
12
|
-
config
|
12
|
+
config[:semi_reliable_fetch] = true
|
13
13
|
Sidekiq::ReliableFetch.setup_reliable_fetch!(config)
|
14
14
|
end
|
15
15
|
|
@@ -100,7 +100,7 @@ module Dynflow
|
|
100
100
|
end
|
101
101
|
|
102
102
|
def sidekiq_worker?
|
103
|
-
defined?(::Sidekiq) && ::Sidekiq.
|
103
|
+
defined?(::Sidekiq) && ::Sidekiq.configure_server { |c| c[:queues].any? }
|
104
104
|
end
|
105
105
|
|
106
106
|
def calculate_db_pool_size(world)
|
@@ -108,7 +108,7 @@ module Dynflow
|
|
108
108
|
|
109
109
|
base_value = 5
|
110
110
|
if defined?(::Sidekiq)
|
111
|
-
Sidekiq.
|
111
|
+
Sidekiq.configure_server { |c| c[:concurrency] } + base_value
|
112
112
|
else
|
113
113
|
world.config.queues.values.inject(base_value) do |pool_size, pool_options|
|
114
114
|
pool_size += pool_options[:pool_size]
|
@@ -152,7 +152,7 @@ module Dynflow
|
|
152
152
|
# we can't do any operation until the Rails.application.dynflow.world is set
|
153
153
|
config.auto_execute = false
|
154
154
|
config.auto_validity_check = false
|
155
|
-
if sidekiq_worker? && !Sidekiq.
|
155
|
+
if sidekiq_worker? && !Sidekiq.configure_server { |c| c[:queues].include?("dynflow_orchestrator") }
|
156
156
|
config.delayed_executor = nil
|
157
157
|
end
|
158
158
|
end
|
@@ -192,7 +192,7 @@ module Dynflow
|
|
192
192
|
if remote?
|
193
193
|
false
|
194
194
|
else
|
195
|
-
if defined?(::Sidekiq) && Sidekiq.
|
195
|
+
if defined?(::Sidekiq) && Sidekiq.configure_server { |c| c[:dynflow_executor] }
|
196
196
|
::Dynflow::Executors::Sidekiq::Core
|
197
197
|
else
|
198
198
|
::Dynflow::Executors::Parallel::Core
|
data/lib/dynflow/version.rb
CHANGED
data/lib/dynflow.rb
CHANGED
@@ -25,7 +25,7 @@ module Dynflow
|
|
25
25
|
# @return [Dynflow::World, nil]
|
26
26
|
def process_world
|
27
27
|
return @process_world if defined? @process_world
|
28
|
-
@process_world = Sidekiq.options[:dynflow_world]
|
28
|
+
@process_world = Sidekiq.configure_server { |c| c.options[:dynflow_world] }
|
29
29
|
raise "process world is not set" unless @process_world
|
30
30
|
@process_world
|
31
31
|
end
|