diff --git a/systemd_notifier.rb b/systemd_notifier.rb index 77de16e..995ab33 100644 --- a/systemd_notifier.rb +++ b/systemd_notifier.rb @@ -35,9 +35,8 @@ class SystemdNotifier @enable_heartbeat end - def notify(message) + def self.notify(message) return unless @enable_heartbeat - begin @socket.send(message, 0) MethodExecutor.record("debug", "heartbeat", "Heartbeat sent: #{message}")