okcomputer 1.15.0 → 1.16.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: 99ca2ec1ff46d08a26f3ff8ee3d83057d3e767db
4
- data.tar.gz: 838198d8a85cd59691ae608cf9f9908f1c3796d6
3
+ metadata.gz: 668d969c4dc663bf14304a9f68067ef371afe08e
4
+ data.tar.gz: 749de937769d55fb8a178840e08e296abb02fd99
5
5
  SHA512:
6
- metadata.gz: 225b273a77e2f230625265bd6a40463c0de7d9212ac1bb38eeb7c48a1b21369722edaf5fbcab6ac48018e6ca5c2701ddb66f4c09093dc4d3638fbf9140da2204
7
- data.tar.gz: 0b6f9987e4f0dcd90967592a439f00435fd96128aa2f6a4056b48e2aa927032c8cab3be203d5c55c98299ce1a5a8df7dfaeb1df5861ba557ab4e6bd706fcd23b
6
+ metadata.gz: fff29eae61eeb8d501333c8acd3bb4a6c0d8c105767c3d8026535ccfd8e9c3812ae2835c4be81ba35fbac4bfe26809b4a68da7153770a22953081ec8a703134a
7
+ data.tar.gz: 8031216b51a057519e3d5460bb4054260fd0095f1cedfe25eae20717704005a6a2f920b13bc702f152c326dc88ea4be8eabe1d9b9eca36708e36bcd8ca29dbd0
data/README.markdown CHANGED
@@ -108,6 +108,9 @@ Register additional checks in an initializer, like so:
108
108
  # config/initializers/okcomputer.rb
109
109
  OkComputer::Registry.register "resque_down", OkComputer::ResqueDownCheck.new
110
110
  OkComputer::Registry.register "resque_backed_up", OkComputer::ResqueBackedUpCheck.new("critical", 100)
111
+
112
+ # This check works on 2.4.0 and above versions of resque-scheduler
113
+ OkComputer::Registry.register "resque_scheduler_down", OkComputer::ResqueSchedulerCheck.new
111
114
  ```
112
115
 
113
116
  ### Registering Custom Checks
@@ -0,0 +1,16 @@
1
+ module OkComputer
2
+ class ResqueSchedulerCheck < Check
3
+ def check
4
+ if working?
5
+ mark_message 'Resque Scheduler is UP'
6
+ else
7
+ mark_failure
8
+ mark_message 'Resque Scheduler is DOWN'
9
+ end
10
+ end
11
+
12
+ def working?
13
+ Resque.keys.any?{|k| k == 'resque_scheduler_master_lock'}
14
+ end
15
+ end
16
+ end
@@ -1,3 +1,3 @@
1
1
  module OkComputer
2
- VERSION = '1.15.0'
2
+ VERSION = '1.16.0'
3
3
  end
data/lib/okcomputer.rb CHANGED
@@ -28,6 +28,7 @@ require "ok_computer/built_in_checks/rabbitmq_check"
28
28
  require "ok_computer/built_in_checks/redis_check"
29
29
  require "ok_computer/built_in_checks/resque_backed_up_check"
30
30
  require "ok_computer/built_in_checks/resque_down_check"
31
+ require "ok_computer/built_in_checks/resque_scheduler_check"
31
32
  require "ok_computer/built_in_checks/resque_failure_threshold_check"
32
33
  require "ok_computer/built_in_checks/ruby_version_check"
33
34
  require "ok_computer/built_in_checks/sequel_check"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: okcomputer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.0
4
+ version: 1.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Byrne
@@ -107,6 +107,7 @@ files:
107
107
  - lib/ok_computer/built_in_checks/resque_backed_up_check.rb
108
108
  - lib/ok_computer/built_in_checks/resque_down_check.rb
109
109
  - lib/ok_computer/built_in_checks/resque_failure_threshold_check.rb
110
+ - lib/ok_computer/built_in_checks/resque_scheduler_check.rb
110
111
  - lib/ok_computer/built_in_checks/ruby_version_check.rb
111
112
  - lib/ok_computer/built_in_checks/sequel_check.rb
112
113
  - lib/ok_computer/built_in_checks/sidekiq_latency_check.rb