okcomputer 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +7 -0
- data/lib/ok_computer/built_in_checks/resque_failure_threshold_check.rb +19 -0
- data/lib/ok_computer/version.rb +1 -1
- data/lib/okcomputer.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30beb5a8130ac0a3b620865483fa532a6be7a592
|
4
|
+
data.tar.gz: 5bd39d33d5cd603fcc4c38b480eeb709df8d31cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1616e50254ed732be4081370c06b745e89f859c9b668e5e02bb5ec420c573ff20f7a38dffc2c3696a6c13dd4b71479df30b48f6e05a666c95ca1836d73f5500a
|
7
|
+
data.tar.gz: a4bef47452c4805d6ac8151e512403683f89e72dcb181fef7933c566be299ad323d848384dfe99302acbb7481fcba232777b5fb360c7f6f70550b4fc5b6d26f0
|
data/README.markdown
CHANGED
@@ -57,6 +57,13 @@ Optionally require HTTP Basic authentication to view the results of checks in an
|
|
57
57
|
OkComputer.require_authentication("username", "password")
|
58
58
|
```
|
59
59
|
|
60
|
+
To allow access to specific checks without a password, optionally specify the names of the checks:
|
61
|
+
|
62
|
+
```ruby
|
63
|
+
# config/initializers/okcomputer.rb
|
64
|
+
OkComputer.require_authentication("username", "password", except: %w(default nonsecret))
|
65
|
+
```
|
66
|
+
|
60
67
|
### Changing the OkComputer Route
|
61
68
|
|
62
69
|
By default, OkComputer routes are mounted at `/okcomputer`. If you'd like to use an alternate route,
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module OkComputer
|
2
|
+
class ResqueFailureThresholdCheck < SizeThresholdCheck
|
3
|
+
attr_accessor :threshold
|
4
|
+
|
5
|
+
# Public: Initialize a check for a backed-up Resque queue
|
6
|
+
#
|
7
|
+
# threshold - An Integer to compare the queue's count against to consider
|
8
|
+
# it backed up
|
9
|
+
def initialize(threshold)
|
10
|
+
self.threshold = Integer(threshold)
|
11
|
+
self.name = "Resque Failed Jobs"
|
12
|
+
end
|
13
|
+
|
14
|
+
# Public: The number of jobs in the check's queue
|
15
|
+
def size
|
16
|
+
Resque::Failure.count
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/ok_computer/version.rb
CHANGED
data/lib/okcomputer.rb
CHANGED
@@ -10,6 +10,7 @@ require "ok_computer/built_in_checks/active_record_check"
|
|
10
10
|
require "ok_computer/built_in_checks/default_check"
|
11
11
|
require "ok_computer/built_in_checks/mongoid_check"
|
12
12
|
require "ok_computer/built_in_checks/resque_backed_up_check"
|
13
|
+
require "ok_computer/built_in_checks/resque_failure_threshold_check"
|
13
14
|
require "ok_computer/built_in_checks/resque_down_check"
|
14
15
|
require "ok_computer/built_in_checks/delayed_job_backed_up_check"
|
15
16
|
require "ok_computer/built_in_checks/ruby_version_check"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: okcomputer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Byrne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sqlite3
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- lib/ok_computer/built_in_checks/mongoid_check.rb
|
75
75
|
- lib/ok_computer/built_in_checks/resque_backed_up_check.rb
|
76
76
|
- lib/ok_computer/built_in_checks/resque_down_check.rb
|
77
|
+
- lib/ok_computer/built_in_checks/resque_failure_threshold_check.rb
|
77
78
|
- lib/ok_computer/built_in_checks/ruby_version_check.rb
|
78
79
|
- lib/ok_computer/built_in_checks/size_threshold_check.rb
|
79
80
|
- lib/ok_computer/check.rb
|