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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b6682772e7c4324485934c82c4c4acef12ca804
4
- data.tar.gz: a4092bbb63449d3a68a9fe406e8e66afffc7039a
3
+ metadata.gz: fe021b7533f639dfb559003b52b2dd13c3c1e4a9
4
+ data.tar.gz: bb65eeab6fda7e2dcb07423ecd06a9e82df3c70e
5
5
  SHA512:
6
- metadata.gz: 020f78ff5439cbd78ce11fe6dbae6d47d38f34dd281765bc179671a3a5408ece6c262f6d849aa908c92eb9d1fa3fa49aed2d57743e3a0b204de404001ee1596d
7
- data.tar.gz: 7a24d4074534c8af29668596219f22bad41cf53321e08cb9a0b402b4cc1acc7a98cbd4ad15f625305d9a8d492226d911737ddf0a91ec14bdf5a0fda106e93249
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 > 60.seconds.ago
95
+ last_heartbeat && last_heartbeat > Time.now - running_threshold
94
96
  end
95
97
 
96
98
  def self.multiple?
@@ -1,3 +1,3 @@
1
1
  module ClockworkWeb
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
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
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-03-16 00:00:00.000000000 Z
11
+ date: 2015-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clockwork