From d080a92961fc2d35103820015a6e378529342257 Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Wed, 18 Oct 2023 10:23:22 -0400 Subject: [PATCH] Fixes #36841 - Switch to Process.clock_gettime for ping --- app/services/ping.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/services/ping.rb b/app/services/ping.rb index e24fbabdc990..e6db6358af07 100644 --- a/app/services/ping.rb +++ b/app/services/ping.rb @@ -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), @@ -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, @@ -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']