web47core 3.2.3.47 → 3.2.3.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fac443ea8a3048e4785964d2899475fd8ac9025610a8f654250a900831228d06
4
- data.tar.gz: ad2d4ae7bf3120c6ea32c065a486f0c8c7c7533b228b2cdb3c9ea1933648fad2
3
+ metadata.gz: b460458978fdba54209f884a08fd57d1407bb02e4542ed559f9198aa918eb162
4
+ data.tar.gz: b3d3c901f101674abe9be6cdafa8e2f866f795826b1a6ce00aedc49ad6802428
5
5
  SHA512:
6
- metadata.gz: d8ad5891e0a99c57d3a4d507c368adf58060d2ff3b85558dbef0be63f3ef67ed0971270ec5d7bf46f46a5cef06fccd70b2b157b8a8c27293746d3be961838c09
7
- data.tar.gz: e9c1e1d9ade0fb0923f42199477d47692b83564c372a900217acefc8904291c1eefefd90f02a06284cc49a89a94899f29f5444b0bc71e9e953ea8ea44ae5b12c
6
+ metadata.gz: 4a6ae3bf153a29041e5bf6b2c1e13f611a7056036dd50729e9c592b89d9015347b7fe9a5d2a5e584cad78fa4757b9f6e0ddd0720f91d233ba5feb27277f1989c
7
+ data.tar.gz: e5100c2ef32e912f2b7f03afa453f2895f17879805e7dfaf4f17c3ce078de54f87d53e1e4604c5e00b0b82d7f9ed24fca4ffd46dc073b7dc2e1bca1caf8d9206
@@ -10,7 +10,7 @@ class StatusController < ActionController::Base
10
10
  #
11
11
  def index
12
12
  components = { mongo: mongo_status,
13
- redis: redis_status,
13
+ cache: cache_status,
14
14
  jobs: delayed_jobs_status,
15
15
  cron_job_servers: cron_job_servers_status,
16
16
  workers: workers_status,
@@ -26,10 +26,10 @@ class StatusController < ActionController::Base
26
26
  private
27
27
 
28
28
  #
29
- # Return the status of the key components, mongo, redis
29
+ # Return the status of the key components, mongo, cache
30
30
  #
31
31
  def db_status(components)
32
- components[:mongo][:success] && components[:redis][:success] ? 200 : 500
32
+ components[:mongo][:success] && components[:cache][:success] ? 200 : 500
33
33
  rescue StandardError
34
34
  500
35
35
  end
@@ -75,18 +75,20 @@ class StatusController < ActionController::Base
75
75
  end
76
76
 
77
77
  #
78
- # Redis DB Status
78
+ # Cache Status
79
79
  #
80
- def redis_status
80
+ def cache_status
81
81
  value = SecureRandom.hex(32)
82
- key = "redis-status-check-#{SecureRandom.hex(16)}"
83
- Rails.cache.write key, value, expires_in: 15.seconds
84
- cached_value = Rails.cache.fetch(key)
82
+ key = "cache-status-check-#{SecureRandom.hex(16)}"
83
+ cache = Rails.cache
84
+ write_result = cache.write(key, value, expires_in: 15.seconds)
85
+ cached_value = cache.read(key)
85
86
  unless value.eql?(cached_value)
86
- raise "Redis not available: Expected: #{value} with key #{key}, but got #{cached_value}"
87
+ raise "Cache not available (#{cache.class.name}): Expected: #{value} with key #{key}, " \
88
+ "but got #{cached_value.inspect}; write returned #{write_result.inspect}"
87
89
  end
88
90
 
89
- report_success 'Redis Available', count: 1
91
+ report_success 'Cache Available', count: 1
90
92
  rescue StandardError => error
91
93
  report_error(error, count: 0)
92
94
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Web47core
4
- VERSION = '3.2.3.47'
4
+ VERSION = '3.2.3.48'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web47core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.3.47
4
+ version: 3.2.3.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Schroeder