Skip to content

Commit 4a734a6

Browse files
committed
Don't require sd_notify if not running in systemd
1 parent 6aaf8c1 commit 4a734a6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

workers/event_catcher/event_catcher.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ def messaging_client
135135
end
136136

137137
def notify_started
138-
SdNotify.ready
138+
SdNotify.ready if ENV.fetch("NOTIFY_SOCKET", nil)
139139
end
140140

141141
def heartbeat
142-
SdNotify.watchdog
142+
SdNotify.watchdog if ENV.fetch("NOTIFY_SOCKET", nil)
143143
end
144144

145145
def notify_stopping
146-
SdNotify.stopping
146+
SdNotify.stopping if ENV.fetch("NOTIFY_SOCKET", nil)
147147
end
148148
end

workers/event_catcher/worker

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
require "bundler/inline"
44

5-
gemfile do
5+
gemfile(false) do
66
source "https://rubygems.org"
77

88
gem "manageiq-loggers", "~>1.0"
99
gem "manageiq-messaging", "~> 1.0"
1010
gem "rbvmomi2", "~> 3.3"
11-
gem "sd_notify"
11+
gem "sd_notify" if ENV.fetch("NOTIFY_SOCKET", nil)
1212
gem "json"
1313
end
1414

0 commit comments

Comments
 (0)