clockwork_web 0.0.3 → 0.0.4

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: 925bad3f5186da79cd04a72e1aee6eac89341d9e
4
- data.tar.gz: 7c141e2b984332b34e16f8ad947d72203468a31a
3
+ metadata.gz: 5b6682772e7c4324485934c82c4c4acef12ca804
4
+ data.tar.gz: a4092bbb63449d3a68a9fe406e8e66afffc7039a
5
5
  SHA512:
6
- metadata.gz: 24497bfea53482d963022e171e0910cc21ce79f01ebc101a3265aac470fe25b7888e9d8237516b8eb5532e677c08ab141496a21277bdb6c1fe78880637f02925
7
- data.tar.gz: da8ffb43b16dd28346b0e3aa099f440646a787da6b81b607921b8d95e52eeef86d002d76ee81e667fa82e0f8875f527af5ce99d773483b30082d2ed4e3e97e21
6
+ metadata.gz: 020f78ff5439cbd78ce11fe6dbae6d47d38f34dd281765bc179671a3a5408ece6c262f6d849aa908c92eb9d1fa3fa49aed2d57743e3a0b204de404001ee1596d
7
+ data.tar.gz: 7a24d4074534c8af29668596219f22bad41cf53321e08cb9a0b402b4cc1acc7a98cbd4ad15f625305d9a8d492226d911737ddf0a91ec14bdf5a0fda106e93249
@@ -0,0 +1,3 @@
1
+ ## 0.0.4 [unreleased]
2
+
3
+ - Better monitoring for multiple processes
data/README.md CHANGED
@@ -4,12 +4,12 @@ A web interface for Clockwork
4
4
 
5
5
  [View the demo](https://clockwork-web.herokuapp.com/)
6
6
 
7
- [screenshot goes here]
8
-
9
7
  - see list of jobs
10
8
  - monitor jobs
11
9
  - disable jobs
12
10
 
11
+ :tangerine: Battle-tested at [Instacart](https://www.instacart.com)
12
+
13
13
  ## Installation
14
14
 
15
15
  Add this line to your application’s Gemfile:
@@ -26,7 +26,7 @@ mount ClockworkWeb::Engine, at: "clockwork"
26
26
 
27
27
  Be sure to secure the dashboard in production.
28
28
 
29
- To see the last run and disable jobs, hook up Redis in an initializer.
29
+ To monitor and disable jobs, hook up Redis in an initializer.
30
30
 
31
31
  ```ruby
32
32
  ClockworkWeb.redis = Redis.new
@@ -74,6 +74,10 @@ ClockworkWeb.monitor = false
74
74
 
75
75
  - better design
76
76
 
77
+ ## History
78
+
79
+ View the [changelog](CHANGELOG.md)
80
+
77
81
  ## Contributing
78
82
 
79
83
  Everyone is encouraged to help improve this project. Here are a few ways you can help:
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "clockwork"
22
- spec.add_dependency "robustly"
22
+ spec.add_dependency "safely_block"
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.7"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
@@ -2,7 +2,7 @@ require "clockwork_web/version"
2
2
 
3
3
  # dependencies
4
4
  require "clockwork"
5
- require "robustly"
5
+ require "safely_block"
6
6
 
7
7
  # engine
8
8
  require "clockwork_web/engine"
@@ -11,6 +11,7 @@ module ClockworkWeb
11
11
  LAST_RUNS_KEY = "clockwork:last_runs"
12
12
  DISABLED_KEY = "clockwork:disabled"
13
13
  HEARTBEAT_KEY = "clockwork:heartbeat"
14
+ STATUS_KEY = "clockwork:status"
14
15
 
15
16
  class << self
16
17
  attr_accessor :clock_path
@@ -81,11 +82,8 @@ module ClockworkWeb
81
82
  heartbeat = Time.now.to_i
82
83
  if heartbeat % 10 == 0
83
84
  prev_heartbeat = redis.getset(HEARTBEAT_KEY, heartbeat).to_i
84
- if heartbeat == prev_heartbeat
85
- # TODO debounce
86
- # TODO try to surface hostnames when this condition is detected
87
- # TODO hook to take action
88
- redis.setex("clockwork:status", 20, "multiple")
85
+ if prev_heartbeat >= heartbeat
86
+ redis.setex(STATUS_KEY, 60, "multiple")
89
87
  end
90
88
  end
91
89
  end
@@ -96,7 +94,7 @@ module ClockworkWeb
96
94
  end
97
95
 
98
96
  def self.multiple?
99
- redis && redis.get("clockwork:status") == "multiple"
97
+ redis && redis.get(STATUS_KEY) == "multiple"
100
98
  end
101
99
  end
102
100
 
@@ -1,3 +1,3 @@
1
1
  module ClockworkWeb
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
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.3
4
+ version: 0.0.4
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-02-15 00:00:00.000000000 Z
11
+ date: 2015-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clockwork
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: robustly
28
+ name: safely_block
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -74,6 +74,7 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - ".gitignore"
77
+ - CHANGELOG.md
77
78
  - Gemfile
78
79
  - LICENSE.txt
79
80
  - README.md
@@ -111,3 +112,4 @@ signing_key:
111
112
  specification_version: 4
112
113
  summary: A web interface for Clockwork
113
114
  test_files: []
115
+ has_rdoc: