From b838a96b6f8d4893e3afb0ccd372acab202c6052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?heriberto=20perez=20maga=C3=B1a?= Date: Fri, 27 Oct 2023 15:47:28 -0600 Subject: [PATCH] Uses timeout from Timeout.timeout instead from Object Fixes issue https://github.com/mojombo/god/pull/262 --- lib/god/system/slash_proc_poller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/god/system/slash_proc_poller.rb b/lib/god/system/slash_proc_poller.rb index 59693cf9..e5eaa901 100644 --- a/lib/god/system/slash_proc_poller.rb +++ b/lib/god/system/slash_proc_poller.rb @@ -61,7 +61,7 @@ def percent_cpu # read from them. Try to use this sparingly as it is expensive. def self.readable?(path) begin - timeout(1) { File.read(path) } + Timeout.timeout(1) { File.read(path) } rescue Timeout::Error false end