sidekiq_snitch 1.1.0 → 1.2.0

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: aca32c30d3f089278fbcb876f7a1a510e5ef718f
4
- data.tar.gz: f52ae1482258ead10c0fbda9ab1a0ff77ff2862c
3
+ metadata.gz: e93d050d1ec259c9f6999a0233af52290500260a
4
+ data.tar.gz: 42b4633edb33029ff5d31c8023db288ede8617b6
5
5
  SHA512:
6
- metadata.gz: 9bfaf7f95ddcf5e0480996da62334a13f21b1a2f17d049db1306d59eb246a36ac7766efb24148dd198658ad71b9ef655a47eaf498287c30ed44eadcc50d17c42
7
- data.tar.gz: d1433aca26e0ab3e7480908fb0e7d9435421de6cbe48eefb4b5c80aedeac74a7c35bb774328ab2ee5da809f63e75f8faaf8bf9da6a88d0311d0bf70dfb2db3c2
6
+ metadata.gz: 3bd27cb05071385d4519c849a97c6035a3ef45fe1f8baf0c5613d300a9893a401885c2c6afdbdd6454ffbcd2888f40fa7a72a6fa72aa431911560c2d1ac1eb9d
7
+ data.tar.gz: d692b4547d069c5d4fa3d6c3ed94731ff89f368400c159d166e509eddc87e26686b94a9d4eed4bc8b510451845318b183ced028e218dd8baae9430d88e58fb65
@@ -7,8 +7,8 @@ require 'sidekiq/api'
7
7
  # When none are found, schedule one to run immediately. The worker
8
8
  # will then take care of rescheduling itself.
9
9
  set = Sidekiq::ScheduledSet.new
10
- length = set.select {|job| job.klass == "Sidekiq::Snitch" }.length
10
+ already_scheduled = set.any? {|job| job.klass == "Sidekiq::Snitch" }
11
11
 
12
- unless length > 0 || ENV['SIDEKIQ_SNITCH_URL'].blank?
12
+ if ! already_scheduled && ! ENV['SIDEKIQ_SNITCH_URL'].blank?
13
13
  Sidekiq::Snitch.perform_async
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module SidekiqSnitch
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_snitch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joost Baaij
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-19 00:00:00.000000000 Z
11
+ date: 2016-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project:
79
- rubygems_version: 2.2.2
79
+ rubygems_version: 2.4.8
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Monitor Sidekiq using Dead Mans's Snitch