clockwork_web 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of clockwork_web might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/clockwork_web.rb +3 -1
- data/lib/clockwork_web/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe021b7533f639dfb559003b52b2dd13c3c1e4a9
|
4
|
+
data.tar.gz: bb65eeab6fda7e2dcb07423ecd06a9e82df3c70e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5181a10c696b4b72be54d526fc55246834f1698b322c7223156d3162992363c6cf5439ea9f48b19c9b16e04ea3fdba794038300681da7309b4ddd956af12c3a
|
7
|
+
data.tar.gz: 89c743c4d6131fbdfff0d8a3f2216956b1dfe75e7ded768faec05e57baebf2840207216aa98d027687ae7179fce74189cf55ae18be8fcd906946ea1b3f8f2e5f
|
data/lib/clockwork_web.rb
CHANGED
@@ -17,8 +17,10 @@ module ClockworkWeb
|
|
17
17
|
attr_accessor :clock_path
|
18
18
|
attr_accessor :redis
|
19
19
|
attr_accessor :monitor
|
20
|
+
attr_accessor :running_threshold
|
20
21
|
end
|
21
22
|
self.monitor = true
|
23
|
+
self.running_threshold = 60 # seconds
|
22
24
|
|
23
25
|
def self.enable(job)
|
24
26
|
if redis
|
@@ -90,7 +92,7 @@ module ClockworkWeb
|
|
90
92
|
end
|
91
93
|
|
92
94
|
def self.running?
|
93
|
-
last_heartbeat && last_heartbeat >
|
95
|
+
last_heartbeat && last_heartbeat > Time.now - running_threshold
|
94
96
|
end
|
95
97
|
|
96
98
|
def self.multiple?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clockwork_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clockwork
|