web47core 0.8.3 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/status_controller.rb +3 -3
- data/lib/app/jobs/cron/command.rb +1 -0
- data/lib/app/jobs/cron/server.rb +2 -1
- data/lib/web47core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 905ca3d7fded036e8b80b3815fce050c3eb75ecc3666e9f3033abbed129bea4f
|
4
|
+
data.tar.gz: 670beb30aa2dbe5751bdeb42b3b65fe09d120392dd726dcc691d2cbad9f53126
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eaeb13b4b2117327fb0fd5cddb7a0bb89642356caf10f085b936c9820a1e9d89d118a1e0f3cad52667a1f463db26c7f2d8f536979c15dd151d533da70530b82e
|
7
|
+
data.tar.gz: 5f6cc5fe0baea5cc355f25c29ddc161623f42718e9581b9dd6ef45a4d63aaf318d15faa08be6cdecc114e5565811fbe057fd85e3910b78e360af3e1d25e0fdc0
|
@@ -17,8 +17,8 @@ class StatusController < ActionController::Base
|
|
17
17
|
|
18
18
|
respond_to do |format|
|
19
19
|
format.html { render :index, locals: { components: ui_decorators(components) }, layout: false }
|
20
|
-
format.json { render json: components.to_json }
|
21
|
-
format.text { render plain: components.flatten, status:
|
20
|
+
format.json { render json: components.to_json, status: db_status(components) }
|
21
|
+
format.text { render plain: components.flatten, status: db_status(components) }
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -27,7 +27,7 @@ class StatusController < ActionController::Base
|
|
27
27
|
#
|
28
28
|
# Return the status of the key components, mongo, redis
|
29
29
|
#
|
30
|
-
def
|
30
|
+
def db_status(components)
|
31
31
|
components[:mongo][:success] && components[:redis][:success] ? 200 : 500
|
32
32
|
rescue StandardError
|
33
33
|
500
|
data/lib/app/jobs/cron/server.rb
CHANGED
@@ -48,6 +48,7 @@ module Cron
|
|
48
48
|
time_to_next_run
|
49
49
|
ensure
|
50
50
|
check_in
|
51
|
+
GC.start
|
51
52
|
end
|
52
53
|
|
53
54
|
def run_cron_jobs
|
@@ -151,7 +152,7 @@ module Cron
|
|
151
152
|
# Perform a check in for the server
|
152
153
|
#
|
153
154
|
def check_in
|
154
|
-
set last_check_in_at: Time.now.utc
|
155
|
+
set({ last_check_in_at: Time.now.utc })
|
155
156
|
end
|
156
157
|
|
157
158
|
#
|
data/lib/web47core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web47core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Schroeder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|