sidekiq_snitch 1.0.0 → 1.1.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: e668171e99cc041cce0d93a81aff388de05661d5
4
- data.tar.gz: 4e58aac0e27791e1297437afeff4f2aa4e4fa86c
3
+ metadata.gz: aca32c30d3f089278fbcb876f7a1a510e5ef718f
4
+ data.tar.gz: f52ae1482258ead10c0fbda9ab1a0ff77ff2862c
5
5
  SHA512:
6
- metadata.gz: eeb0aa718a90097394e93f22ff0a449e8c88dce6f49386365421671830a9bec0e38cef6ac57f6d72e163c297cd368bb60ff2f4cddab5d7ff6cbb04349206788b
7
- data.tar.gz: 4566198e57cf9337f1edb2f17e302ad218b4adf659e565f5217c6358b5c432c137898ea945bf0f1d4a909235e544c0adce626e94ad2d1cf46682a4908d2b2691
6
+ metadata.gz: 9bfaf7f95ddcf5e0480996da62334a13f21b1a2f17d049db1306d59eb246a36ac7766efb24148dd198658ad71b9ef655a47eaf498287c30ed44eadcc50d17c42
7
+ data.tar.gz: d1433aca26e0ab3e7480908fb0e7d9435421de6cbe48eefb4b5c80aedeac74a7c35bb774328ab2ee5da809f63e75f8faaf8bf9da6a88d0311d0bf70dfb2db3c2
@@ -6,7 +6,7 @@ Rails engine to monitor your Sidekiq queue using Dead Man's Snitch.
6
6
 
7
7
  First, create an account at Dead Man's Snitch http://www.deadmanssnitch.com/
8
8
 
9
- Then, create a snitch. Put its value in ENV['SIDEKIQ_SNITCH_URL'].
9
+ Then, create an hourly snitch. Put its value in ENV['SIDEKIQ_SNITCH_URL'].
10
10
 
11
11
  In Gemfile:
12
12
 
@@ -32,6 +32,11 @@ Answer: create an initializer:
32
32
 
33
33
  ENV['SIDEKIQ_SNITCH_URL'] = "https://snitch.url.example.com"
34
34
 
35
+ Question: Can I turn this off in my development environment?
36
+
37
+ Answer: Sure! Just make sure there is no value set for ENV['SIDEKIQ_SNITCH_URL'].
38
+ Sidekiq Snitch only runs if it has somewhere to snitch.
39
+
35
40
  = Created by
36
41
 
37
42
  Space Babies. www.spacebabies.nl
@@ -1,7 +1,7 @@
1
1
  require 'sidekiq'
2
2
  require 'net/http'
3
3
 
4
- # A worker to contact deadmanssnitch.com every five minutes,
4
+ # A worker to contact deadmanssnitch.com periodically,
5
5
  # thereby ensuring jobs are being performed and the system
6
6
  # is healthy.
7
7
  module Sidekiq
@@ -9,10 +9,12 @@ module Sidekiq
9
9
  include Sidekiq::Worker
10
10
 
11
11
  def perform
12
- Net::HTTP.get(URI(ENV['SIDEKIQ_SNITCH_URL']))
12
+ if ENV['SIDEKIQ_SNITCH_URL'].present?
13
+ Net::HTTP.get(URI(ENV['SIDEKIQ_SNITCH_URL']))
13
14
 
14
- # groundhog day!
15
- Snitch.perform_in(1.hour)
15
+ # groundhog day!
16
+ Snitch.perform_in(1.hour)
17
+ end
16
18
  end
17
19
  end
18
20
  end
@@ -9,6 +9,6 @@ require 'sidekiq/api'
9
9
  set = Sidekiq::ScheduledSet.new
10
10
  length = set.select {|job| job.klass == "Sidekiq::Snitch" }.length
11
11
 
12
- unless length > 0
12
+ unless length > 0 || 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.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_snitch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.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: 2014-06-22 00:00:00.000000000 Z
11
+ date: 2015-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sidekiq
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.5.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.5.0
41
41
  description: A Rails engine that monitors your Sidekiq install using Dead Man's Snitch
@@ -46,16 +46,16 @@ executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
+ - MIT-LICENSE
50
+ - README.rdoc
51
+ - Rakefile
49
52
  - app/workers/sidekiq/snitch.rb
50
53
  - config/initializers/perform.rb
51
54
  - config/routes.rb
55
+ - lib/sidekiq_snitch.rb
52
56
  - lib/sidekiq_snitch/engine.rb
53
57
  - lib/sidekiq_snitch/version.rb
54
- - lib/sidekiq_snitch.rb
55
58
  - lib/tasks/sidekiq_snitch_tasks.rake
56
- - MIT-LICENSE
57
- - Rakefile
58
- - README.rdoc
59
59
  homepage: http://www.spacebabies.nl/
60
60
  licenses:
61
61
  - MIT
@@ -66,17 +66,17 @@ require_paths:
66
66
  - lib
67
67
  required_ruby_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - '>='
69
+ - - ">="
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project:
79
- rubygems_version: 2.0.14
79
+ rubygems_version: 2.2.2
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Monitor Sidekiq using Dead Mans's Snitch