komachi_heartbeat 2.1.6 → 2.1.7

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: f7cf211dbb0ad7e4a036089e78030c1fc34333ab
4
- data.tar.gz: dd7e4b29302c35cd40d609b5ef1cc9cd47e8cb47
3
+ metadata.gz: 5242e0baaac1b1bca7fc45e8d6da63bea7b1ad49
4
+ data.tar.gz: c05144cb8c397909b79811457c66eeceb7aeb596
5
5
  SHA512:
6
- metadata.gz: c44b7b4ade8d1bcd3b070fbd4614a32e94a2019e1db0a9368ba05174b20221e89866e7e6735bb1b248c700eb9a920ce16185d64928fa0e86b2881313714f41ae
7
- data.tar.gz: 0e993dbc3546475044bb0ede37904f4420520bb1bcc1ff6916942b17c3d422d173f9f9644456ce2cc7949b74f3b77cf6bac92d9087a27f14742a1ccec25241d0
6
+ metadata.gz: 5c9355c54efbd3939a86da5140ab65970a788e5feb2a69764998a15a2da2badf5f20e691541b3b2d73922c558425bd0529644eca69ff76119466ab9dc7776745
7
+ data.tar.gz: 253bf55dd23336363a9cb5c482b4785ea5d798dddd846ad7d5e7e3b5f535879ccc9c421a6dc3b652141b2e2b4d4d488bc39dd93caa506720612593dd40da47fa
data/README.md CHANGED
@@ -24,6 +24,16 @@ Rails アプリケーションとDBサーバーの死活監視するためのURL
24
24
 
25
25
  アプリ名・バージョンを取得する
26
26
 
27
+ ### WorkerのQueue監視
28
+ `/MOUNT_PATH/stats/worker`
29
+
30
+ - enqueued (処理待ちのQueueの数)
31
+ - processed (完了したQueueの数)
32
+
33
+ を返す
34
+
35
+ [Sidekiq](https://github.com/mperham/sidekiq) と [Resque](https://github.com/resque/resque) に対応しています。
36
+
27
37
  ## Usage
28
38
 
29
39
  1. write Gemfile
@@ -54,6 +64,9 @@ Rails アプリケーションとDBサーバーの死活監視するためのURL
54
64
  - `memcached_server_names`
55
65
  - Memcachedのサーバー名の配列
56
66
  - default: ['localhost']
67
+ - `worker_stats_enabled`
68
+ - WorkerのQueueの数をチェックするかどうか
69
+ - default: false
57
70
 
58
71
  ### Example
59
72
 
@@ -3,18 +3,20 @@ require_dependency "komachi_heartbeat/application_controller"
3
3
  module KomachiHeartbeat
4
4
  class HeartbeatController < ApplicationController
5
5
 
6
- def index
7
- begin
8
- db_connection_check if db_check?
9
- redis_connection_check if redis_check?
10
- memcached_connection_check if memcached_check?
11
-
12
- render text: "heartbeat:ok", status: 200
13
- rescue => e
6
+ unless Rails.env.test?
7
+ rescue_from Exception do |exception|
14
8
  head :internal_server_error
15
9
  end
16
10
  end
17
11
 
12
+ def index
13
+ db_connection_check if db_check?
14
+ redis_connection_check if redis_check?
15
+ memcached_connection_check if memcached_check?
16
+
17
+ render text: "heartbeat:ok", status: 200
18
+ end
19
+
18
20
  def version
19
21
  obj = {:name => application_name, :version => application_version, :access => DateTime.now}
20
22
 
@@ -1,3 +1,3 @@
1
1
  module KomachiHeartbeat
2
- VERSION = "2.1.6"
2
+ VERSION = "2.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: komachi_heartbeat
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.6
4
+ version: 2.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takumi MIURA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-09 00:00:00.000000000 Z
11
+ date: 2014-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -68,6 +68,20 @@ dependencies:
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec-rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 3.0.1
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 3.0.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec-its
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - ">="
@@ -150,6 +164,48 @@ dependencies:
150
164
  - - ">="
151
165
  - !ruby/object:Gem::Version
152
166
  version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: pry
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: pry-nav
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: mock_redis
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
153
209
  description: Alive Monitoring of Application Server and DB Server.
154
210
  email:
155
211
  - mitaku1104@gmail.com
@@ -160,8 +216,6 @@ files:
160
216
  - MIT-LICENSE
161
217
  - README.md
162
218
  - Rakefile
163
- - app/assets/javascripts/komachi_heartbeat/application.js
164
- - app/assets/stylesheets/komachi_heartbeat/application.css
165
219
  - app/controllers/komachi_heartbeat/application_controller.rb
166
220
  - app/controllers/komachi_heartbeat/heartbeat_controller.rb
167
221
  - app/controllers/komachi_heartbeat/stats_controller.rb
@@ -193,8 +247,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
247
  version: '0'
194
248
  requirements: []
195
249
  rubyforge_project:
196
- rubygems_version: 2.2.0
250
+ rubygems_version: 2.2.2
197
251
  signing_key:
198
252
  specification_version: 4
199
- summary: Rails Application Hertbeat Check Engine.
253
+ summary: Rails Application Heartbeat Check Engine.
200
254
  test_files: []
@@ -1,15 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // the compiled file.
9
- //
10
- // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
- // GO AFTER THE REQUIRES BELOW.
12
- //
13
- //= require jquery
14
- //= require jquery_ujs
15
- //= require_tree .
@@ -1,13 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- *= require_self
12
- *= require_tree .
13
- */