dynflow 1.8.1 → 1.8.2

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
  SHA256:
3
- metadata.gz: c3701c362bc17e7586355538e6a469acbb09a6fc88c3f131de41efb6238767ea
4
- data.tar.gz: 6dd66b68d8d6a3ce55badad2d898dac52d1dc1d3451e2b0ba93f70e201bf3c4b
3
+ metadata.gz: d4db626bf7deb1705c684ec0a1e4a0f55326129f94513076d0bd6eda7a8b61e7
4
+ data.tar.gz: 006b0a3e56c17c8c827f7375e761d1f47608b586d5fdbaaa3a16bc220b8879d6
5
5
  SHA512:
6
- metadata.gz: c9984e6831e5a1e6a17e6c8b64b09d026d2c7d81c3d75d5a19963d8246ddef47f54358c8f2c824312328af25712e79c582fb6a0511b615f0a20c3e4fdce49e73
7
- data.tar.gz: 32eaf38d89b5c9f59ac7ddc464a629cbe8a4e0383fb5582cc2a6bd7ccd184bc76b5d5d493b27cec9b9125dc90e56f3641fce5239167d7c69f6ac0bd9b0574c36
6
+ metadata.gz: 8cb9a7044648545e5da5f1be5452d3170a1be2077207ccc83b85c2fd59523851bbe4a2e3cdef484cf6f02c41b82357373de11c4d41b7fb13802be0d1a49aa2c7
7
+ data.tar.gz: 91cb66bfddeb1044c52f2959d7c1d3f3e4ff4bf5b44dfa938ae1d48d07650e6a6c9169f9db6ab73ba0bf79d9bd0ce41235c6b1aecedc322a56f784466fa4bc05
@@ -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
- world = if Sidekiq.options[:queues].include?("dynflow_orchestrator")
171
+ queues = Sidekiq.configure_server { |c| c.options[:queues] }
172
+ world = if queues.include?("dynflow_orchestrator")
172
173
  RemoteExecutorExample.initialize_sidekiq_orchestrator
173
- elsif (Sidekiq.options[:queues] - ['dynflow_orchestrator']).any?
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
@@ -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.options[:semi_reliable_fetch] = true
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.options[:queues].any?
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.options[:concurrency] + base_value
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.options[:queues].include?("dynflow_orchestrator")
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.options[:dynflow_executor]
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
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Dynflow
3
- VERSION = '1.8.1'
3
+ VERSION = '1.8.2'
4
4
  end
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
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: 1.8.1
4
+ version: 1.8.2
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: 2023-11-13 00:00:00.000000000 Z
12
+ date: 2023-11-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json