Adding a heartbeat, avoiding dying cause of one failure.
This commit is contained in:
@@ -59,6 +59,7 @@ def main
|
||||
grace_deadline = Time.now + INITIAL_GRACE
|
||||
while Time.now < grace_deadline
|
||||
sleep 5
|
||||
SystemdNotifier.notify('WATCHDOG=1')
|
||||
next unless ServerStatusDetector::MinecraftServer.self_diag[:type]
|
||||
|
||||
MethodExecutor.record('info', 'mainloop',
|
||||
|
||||
@@ -52,7 +52,6 @@ class SystemdNotifier
|
||||
MethodExecutor.record('debug', 'heartbeat', "Heartbeat sent: #{message}")
|
||||
rescue StandardError => e
|
||||
MethodExecutor.record('error', 'heartbeat', "Failed to send heartbeat: #{e}")
|
||||
@enable_heartbeat = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user