From 5a203082b38244a870015dfeeecabd1bff892432 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Sinha Date: Tue, 11 Jan 2022 15:45:03 +0530 Subject: [PATCH 1/5] Trying to fix timeout method call Trying to fix timeout method call as it is now Timeout::timeout(sec){} --- 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..976bc23d 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 From f382ef1706a7535c43f0f8618a091aac8131fd91 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Sinha Date: Tue, 11 Jan 2022 19:48:27 +0530 Subject: [PATCH 2/5] Update in gemspec Update in gemspec as it is locally hosted at our end for timeout resolution --- god.gemspec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/god.gemspec b/god.gemspec index f4c85a00..7d73096d 100644 --- a/god.gemspec +++ b/god.gemspec @@ -1,20 +1,20 @@ Gem::Specification.new do |s| - s.specification_version = 2 if s.respond_to? :specification_version= - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + # s.specification_version = 2 if s.respond_to? :specification_version= + # s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.name = 'god' - s.version = '0.13.7' + s.version = '0.13.8.1' s.date = '2015-10-19' s.summary = "Process monitoring framework." - s.description = "An easy to configure, easy to extend monitoring framework written in Ruby." + s.description = "An easy to configure, easy to extend monitoring framework written in Ruby.(with add on timeout fix)" - s.authors = ["Tom Preston-Werner", "Kevin Clark", "Eric Lindvall"] + s.authors = ["Tom Preston-Werner", "Kevin Clark", "Eric Lindvall", "Praveen Kumar Sinha"] s.email = 'god-rb@googlegroups.com' s.homepage = 'http://god.rubyforge.org/' s.rubyforge_project = 'god' - s.rubygems_version = '1.3.5' + # s.rubygems_version = '1.3.5' s.require_paths = %w[lib ext] s.executables = ["god"] From ee2390eaed7aca9a9173d2e6d90770cd73dc8b8e Mon Sep 17 00:00:00 2001 From: Praveen Kumar Sinha Date: Wed, 12 Jan 2022 19:32:38 +0530 Subject: [PATCH 3/5] Reverting gemspec --- god.gemspec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/god.gemspec b/god.gemspec index 7d73096d..f4c85a00 100644 --- a/god.gemspec +++ b/god.gemspec @@ -1,20 +1,20 @@ Gem::Specification.new do |s| - # s.specification_version = 2 if s.respond_to? :specification_version= - # s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + s.specification_version = 2 if s.respond_to? :specification_version= + s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.name = 'god' - s.version = '0.13.8.1' + s.version = '0.13.7' s.date = '2015-10-19' s.summary = "Process monitoring framework." - s.description = "An easy to configure, easy to extend monitoring framework written in Ruby.(with add on timeout fix)" + s.description = "An easy to configure, easy to extend monitoring framework written in Ruby." - s.authors = ["Tom Preston-Werner", "Kevin Clark", "Eric Lindvall", "Praveen Kumar Sinha"] + s.authors = ["Tom Preston-Werner", "Kevin Clark", "Eric Lindvall"] s.email = 'god-rb@googlegroups.com' s.homepage = 'http://god.rubyforge.org/' s.rubyforge_project = 'god' - # s.rubygems_version = '1.3.5' + s.rubygems_version = '1.3.5' s.require_paths = %w[lib ext] s.executables = ["god"] From 66d278ddcd03f881f75b16bb6e5584e45b3416de Mon Sep 17 00:00:00 2001 From: Praveen Kumar Sinha Date: Wed, 12 Jan 2022 19:36:14 +0530 Subject: [PATCH 4/5] Updating gemspec for local server deployment --- god.gemspec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/god.gemspec b/god.gemspec index f4c85a00..a7a7ed17 100644 --- a/god.gemspec +++ b/god.gemspec @@ -1,20 +1,20 @@ Gem::Specification.new do |s| - s.specification_version = 2 if s.respond_to? :specification_version= - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + # s.specification_version = 2 if s.respond_to? :specification_version= + # s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.name = 'god' - s.version = '0.13.7' + s.version = '0.13.8.1' s.date = '2015-10-19' s.summary = "Process monitoring framework." - s.description = "An easy to configure, easy to extend monitoring framework written in Ruby." + s.description = "An easy to configure, easy to extend monitoring framework written in Ruby.(with add on timeout fix)" - s.authors = ["Tom Preston-Werner", "Kevin Clark", "Eric Lindvall"] + s.authors = ["Tom Preston-Werner", "Kevin Clark", "Eric Lindvall", "Praveen Kumar Sinha"] s.email = 'god-rb@googlegroups.com' s.homepage = 'http://god.rubyforge.org/' s.rubyforge_project = 'god' - s.rubygems_version = '1.3.5' + # s.rubygems_version = '1.3.5' s.require_paths = %w[lib ext] s.executables = ["god"] @@ -31,7 +31,7 @@ Gem::Specification.new do |s| s.add_development_dependency('prowly', '~> 0.3') s.add_development_dependency('xmpp4r', '~> 0.5') s.add_development_dependency('dike', '~> 0.0.3') - # s.add_development_dependency('rcov', '~> 0.9') + # s.add_development_dependency('rcov', '~> 0.9') s.add_development_dependency('daemons', '~> 1.1') s.add_development_dependency('mocha', '~> 0.10') s.add_development_dependency('gollum', '~> 1.3.1') From 94e3ac5410519204cf277e69e297938462c0173d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Praveen=20=28=E0=A4=AA=E0=A5=8D=E0=A4=B0=E0=A4=B5=E0=A5=80?= =?UTF-8?q?=E0=A4=A3=20=E0=A4=95=E0=A5=81=E0=A4=AE=E0=A4=BE=E0=A4=B0=20?= =?UTF-8?q?=E0=A4=B8=E0=A4=BF=E0=A4=A8=E0=A5=8D=E0=A4=B9=E0=A4=BE=29?= Date: Wed, 26 Feb 2025 13:24:42 +0530 Subject: [PATCH 5/5] 0. Fixing Ruby deprecated method call which was causing it to fail at the level "god -c supercronic_worker_god.rb -D" --- god.gemspec | 2 +- lib/god/socket.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/god.gemspec b/god.gemspec index a7a7ed17..622a8e1a 100644 --- a/god.gemspec +++ b/god.gemspec @@ -3,7 +3,7 @@ Gem::Specification.new do |s| # s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.name = 'god' - s.version = '0.13.8.1' + s.version = '0.13.8.2' s.date = '2015-10-19' s.summary = "Process monitoring framework." diff --git a/lib/god/socket.rb b/lib/god/socket.rb index 1eeeb42d..191bd484 100644 --- a/lib/god/socket.rb +++ b/lib/god/socket.rb @@ -93,7 +93,7 @@ def start end end - if File.exists?(self.socket_file) + if File.exist?(self.socket_file) if @user user_method = @user.is_a?(Integer) ? :getpwuid : :getpwnam uid = Etc.send(user_method, @user).uid