Skip to content

Commit

Permalink
Fixes #36841 - Switch to Process.clock_gettime for ping
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Oct 18, 2023
1 parent 2ae0516 commit d080a92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/services/ping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def duration_ms(start)
end

def ping_database
start = Time.now
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
{
active: ActiveRecord::Base.connection.active?,
duration_ms: duration_ms(start),
Expand All @@ -50,7 +50,7 @@ def ping_database
def statuses_compute_resources
results = []
ComputeResource.all.index.map do |resource|
start = Time.now
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
errors = resource.ping
results << {
name: resource.name,
Expand All @@ -65,7 +65,7 @@ def statuses_compute_resources
def statuses_smart_proxies
results = []
SmartProxy.all.includes(:features).map do |proxy|
start = Time.now
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
begin
version = proxy.statuses[:version].version['version']
features = proxy.statuses[:version].version['modules']
Expand Down

0 comments on commit d080a92

Please sign in to comment.