easymon 1.6.1 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/easymon/checks/active_record_check.rb +1 -0
- data/lib/easymon/checks/active_record_mysql_writeable_check.rb +3 -5
- data/lib/easymon/version.rb +1 -1
- metadata +5 -11
- data/test/dummy/log/development.log +0 -24
- data/test/dummy/log/test.log +0 -8373
- data/test/dummy/tmp/cache/4D4/7A0/health_check +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82da9dec5eb66912f758fe04075ef2121f8c10d4659ab4c3b7cb79b43fc47bba
|
4
|
+
data.tar.gz: 03ef075f7573a79461e40e6924a1c0a57d8cafa6292b7381217a0e2dfe2aef06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37b5c45c57e1fefb47d3eca2549d3bd5dc611697cb5c6efa577f94f8646c67e8240c38ef0de7021dc5f1a9de157fb06bd6ed9f40addeb74f180b61a78ee04912
|
7
|
+
data.tar.gz: 829e5f4a17106de067477d9ffc11d64fc631562a560732945e7b21a15d6b013b19fe49f0b96d7ab3c7e29b45cb3c84ebc23df6b018f450dee1acbd8613cecd9e
|
@@ -2,11 +2,9 @@ module Easymon
|
|
2
2
|
class ActiveRecordMysqlWriteableCheck
|
3
3
|
attr_accessor :klass
|
4
4
|
|
5
|
-
def initialize(klass
|
5
|
+
def initialize(klass)
|
6
6
|
self.klass = klass
|
7
|
-
@query = "SELECT @@read_only"
|
8
|
-
# Trick makara into using the primary db
|
9
|
-
@query += " for UPDATE" if makara
|
7
|
+
@query = "SELECT @@read_only for UPDATE"
|
10
8
|
end
|
11
9
|
|
12
10
|
def check
|
@@ -21,7 +19,7 @@ module Easymon
|
|
21
19
|
|
22
20
|
private
|
23
21
|
def database_writeable?
|
24
|
-
klass.connection.execute(@query).
|
22
|
+
klass.connection.execute(@query).to_enum.first.first.to_i == 0
|
25
23
|
rescue
|
26
24
|
false
|
27
25
|
end
|
data/lib/easymon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easymon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Anderson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -175,14 +175,11 @@ files:
|
|
175
175
|
- test/dummy/config/redis.yml
|
176
176
|
- test/dummy/config/routes.rb
|
177
177
|
- test/dummy/config/storage.yml
|
178
|
-
- test/dummy/log/development.log
|
179
|
-
- test/dummy/log/test.log
|
180
178
|
- test/dummy/public/404.html
|
181
179
|
- test/dummy/public/422.html
|
182
180
|
- test/dummy/public/500.html
|
183
181
|
- test/dummy/public/favicon.ico
|
184
182
|
- test/dummy/script/rails
|
185
|
-
- test/dummy/tmp/cache/4D4/7A0/health_check
|
186
183
|
- test/helpers/easymon/checks_helper_test.rb
|
187
184
|
- test/integration/navigation_test.rb
|
188
185
|
- test/test_helper.rb
|
@@ -202,7 +199,7 @@ homepage: https://github.com/basecamp/easymon
|
|
202
199
|
licenses:
|
203
200
|
- MIT
|
204
201
|
metadata: {}
|
205
|
-
post_install_message:
|
202
|
+
post_install_message:
|
206
203
|
rdoc_options: []
|
207
204
|
require_paths:
|
208
205
|
- lib
|
@@ -218,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
215
|
version: '0'
|
219
216
|
requirements: []
|
220
217
|
rubygems_version: 3.1.6
|
221
|
-
signing_key:
|
218
|
+
signing_key:
|
222
219
|
specification_version: 4
|
223
220
|
summary: Simple availability checks for your rails app
|
224
221
|
test_files:
|
@@ -273,9 +270,6 @@ test_files:
|
|
273
270
|
- test/dummy/public/422.html
|
274
271
|
- test/dummy/public/500.html
|
275
272
|
- test/dummy/public/404.html
|
276
|
-
- test/dummy/log/test.log
|
277
|
-
- test/dummy/log/development.log
|
278
|
-
- test/dummy/tmp/cache/4D4/7A0/health_check
|
279
273
|
- test/dummy/README.rdoc
|
280
274
|
- test/integration/navigation_test.rb
|
281
275
|
- test/test_helper.rb
|
@@ -1,24 +0,0 @@
|
|
1
|
-
[1m[35m (0.3ms)[0m [1m[35mSET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483[0m
|
2
|
-
[1m[35m (1.4ms)[0m [1m[35mCREATE DATABASE `dummy_development` DEFAULT CHARACTER SET `utf8`[0m
|
3
|
-
[1m[35m (0.3ms)[0m [1m[35mSET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483[0m
|
4
|
-
[1m[35m (1.0ms)[0m [1m[35mCREATE DATABASE `dummy_test` DEFAULT CHARACTER SET `utf8`[0m
|
5
|
-
[1m[35m (0.3ms)[0m [1m[35mSET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483[0m
|
6
|
-
[1m[35m (0.3ms)[0m [1m[35mSET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483[0m
|
7
|
-
[1m[35m (25.9ms)[0m [1m[35mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL PRIMARY KEY)[0m
|
8
|
-
[1m[35m (20.9ms)[0m [1m[35mCREATE TABLE `ar_internal_metadata` (`key` varchar(255) NOT NULL PRIMARY KEY, `value` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL)[0m
|
9
|
-
[1m[35m (0.1ms)[0m [1m[34mSELECT GET_LOCK('1721091371569202325', 0)[0m
|
10
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT `schema_migrations`.`version` FROM `schema_migrations` ORDER BY `schema_migrations`.`version` ASC[0m
|
11
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT `ar_internal_metadata`.* FROM `ar_internal_metadata` WHERE `ar_internal_metadata`.`key` = 'environment' LIMIT 1[0m
|
12
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
13
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.2ms)[0m [1m[32mINSERT INTO `ar_internal_metadata` (`key`, `value`, `created_at`, `updated_at`) VALUES ('environment', 'development', '2022-05-04 18:01:28', '2022-05-04 18:01:28')[0m
|
14
|
-
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
15
|
-
[1m[35m (0.1ms)[0m [1m[34mSELECT RELEASE_LOCK('1721091371569202325')[0m
|
16
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT @@read_only[0m
|
17
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT @@read_only[0m
|
18
|
-
[1m[35m (0.1ms)[0m [1m[34mSELECT @@read_only[0m
|
19
|
-
[1m[35m (0.8ms)[0m [1m[34mSELECT @@read_only;[0m
|
20
|
-
[1m[35m (0.9ms)[0m [1m[34mSELECT @@read_only;[0m
|
21
|
-
[1m[35m (3.2ms)[0m [1m[34mSELECT @@read_only;[0m
|
22
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT @@read_only[0m
|
23
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT @@read_only;[0m
|
24
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT `schema_migrations`.`version` FROM `schema_migrations` ORDER BY `schema_migrations`.`version` ASC[0m
|