sidekiq-scheduler 2.1.4 → 2.1.5

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: 319bbbd230c5e980c19cc64fc01b75e2a7ecfffd
4
- data.tar.gz: 0225011ead92c866aae7096e54527d9f1ebc67ed
3
+ metadata.gz: 95b627a8982949410035fa6b52f0881f2a8e76eb
4
+ data.tar.gz: 58beafa9d5cd50896272e5ae462b81c5abbe3255
5
5
  SHA512:
6
- metadata.gz: 945f09111baa0157ccb51bac0d7c09acb0702edfb3b94104e55320d59e1fa5603157670e5de28b29a9d5934a7815b6c93015e99329534651252235572b17a85e
7
- data.tar.gz: 214380d3128ab3e322450eb4aa7957aa925440afcf346abaf623071ac884e0ef50cb2ba5ddfa0a002b1534a782bd4572daaded19c878c3573011b53abbdd4a36
6
+ metadata.gz: cc7cdbceeb4f2df4428c1b61f012a3c5ad963fdbde9337449baf79bc829fd95735a0305ca2040bcfff827b2067a7895d88b13ff6d909a7d1aaa05c49cbd4ddf8
7
+ data.tar.gz: 2c089e9958c53c22fb0402ec8a6f682a516ad8b96a9a40359151d7560dedb46c90b8664460fdceed42e8f883365675b9f5306db0f2c86078860fdc53742974fe
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
+ # sidekiq-scheduler
2
+
1
3
  <p align="center">
2
4
  <a href="http://moove-it.github.io/sidekiq-scheduler/">
3
- <img src="https://moove-it.github.io/sidekiq-scheduler/images/logo.png" alt="Sidekiq Scheduler" />
5
+ <img src="https://moove-it.github.io/sidekiq-scheduler/images/small-logo.svg" width="468px" height="200px" alt="Sidekiq Scheduler" />
4
6
  </a>
5
7
  </p>
6
8
 
@@ -1,5 +1,5 @@
1
1
  module SidekiqScheduler
2
2
 
3
- VERSION = '2.1.4'
3
+ VERSION = '2.1.5'
4
4
 
5
5
  end
@@ -63,9 +63,10 @@ module Sidekiq
63
63
 
64
64
 
65
65
  @@scheduled_jobs = {}
66
+ queues = sidekiq_queues
66
67
 
67
68
  Sidekiq.schedule.each do |name, config|
68
- if !listened_queues_only || enabled_queue?(config['queue'])
69
+ if !listened_queues_only || enabled_queue?(config['queue'].to_s, queues)
69
70
  load_schedule_job(name, config)
70
71
  else
71
72
  logger.info { "Ignoring #{name}, job's queue is not enabled." }
@@ -284,14 +285,15 @@ module Sidekiq
284
285
  klass
285
286
  end
286
287
 
287
- # Returns true if a job's queue is being listened on by sidekiq
288
+ # Returns true if a job's queue is included in the array of queues
289
+ #
290
+ # If queues are empty, returns true.
288
291
  #
289
292
  # @param [String] job_queue Job's queue name
293
+ # @param [Array<String>] queues
290
294
  #
291
295
  # @return [Boolean]
292
- def enabled_queue?(job_queue)
293
- queues = Sidekiq.options[:queues]
294
-
296
+ def enabled_queue?(job_queue, queues)
295
297
  queues.empty? || queues.include?(job_queue)
296
298
  end
297
299
 
@@ -413,6 +415,9 @@ module Sidekiq
413
415
  end
414
416
  end
415
417
 
418
+ def sidekiq_queues
419
+ Sidekiq.options[:queues].map(&:to_s)
420
+ end
416
421
  end
417
422
  end
418
423
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4
4
+ version: 2.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morton Jonuschat
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-05-03 00:00:00.000000000 Z
12
+ date: 2017-05-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sidekiq
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
267
267
  version: '0'
268
268
  requirements: []
269
269
  rubyforge_project:
270
- rubygems_version: 2.5.1
270
+ rubygems_version: 2.6.11
271
271
  signing_key:
272
272
  specification_version: 4
273
273
  summary: Light weight job scheduling extension for Sidekiq