Compare commits
2 Commits
bb3374b5cc
...
5668d6589f
| Author | SHA1 | Date | |
|---|---|---|---|
| 5668d6589f | |||
| 41ef365e25 |
@@ -59,6 +59,7 @@ def main
|
|||||||
grace_deadline = Time.now + INITIAL_GRACE
|
grace_deadline = Time.now + INITIAL_GRACE
|
||||||
while Time.now < grace_deadline
|
while Time.now < grace_deadline
|
||||||
sleep 5
|
sleep 5
|
||||||
|
SystemdNotifier.notify('WATCHDOG=1')
|
||||||
next unless ServerStatusDetector::MinecraftServer.self_diag[:type]
|
next unless ServerStatusDetector::MinecraftServer.self_diag[:type]
|
||||||
|
|
||||||
MethodExecutor.record('info', 'mainloop',
|
MethodExecutor.record('info', 'mainloop',
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ module ServerStatusDetector
|
|||||||
# @param port [Integer]
|
# @param port [Integer]
|
||||||
# @param timeout [Integer]
|
# @param timeout [Integer]
|
||||||
# @return [Hash{Symbol=>Integer, Symbol=>Symbol, Symbol=>Float,nil}]
|
# @return [Hash{Symbol=>Integer, Symbol=>Symbol, Symbol=>Float,nil}]
|
||||||
def self.test_port(host = '127.0.0.1', port = 25_565, timeout = 10)
|
def self.test_port(host = '127.0.0.1', port = 25_565, timeout = 2)
|
||||||
result = {
|
result = {
|
||||||
port: port,
|
port: port,
|
||||||
status: :unknown,
|
status: :unknown,
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ class SystemdNotifier
|
|||||||
MethodExecutor.record('debug', 'heartbeat', "Heartbeat sent: #{message}")
|
MethodExecutor.record('debug', 'heartbeat', "Heartbeat sent: #{message}")
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
MethodExecutor.record('error', 'heartbeat', "Failed to send heartbeat: #{e}")
|
MethodExecutor.record('error', 'heartbeat', "Failed to send heartbeat: #{e}")
|
||||||
@enable_heartbeat = false
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ require 'net/http'
|
|||||||
require 'uri'
|
require 'uri'
|
||||||
|
|
||||||
# @type const RELEASE_SERIAL_CODE: String
|
# @type const RELEASE_SERIAL_CODE: String
|
||||||
RELEASE_SERIAL_CODE = '13c4c19'
|
RELEASE_SERIAL_CODE = '13c4c19git '
|
||||||
# @type const CHANNEL: String
|
# @type const CHANNEL: String
|
||||||
CHANNEL = 'dev'
|
CHANNEL = 'dev'
|
||||||
# @type const VERSION_LIST_URL: String
|
# @type const VERSION_LIST_URL: String
|
||||||
|
|||||||
Reference in New Issue
Block a user