Ping expects milliseconds
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 8s

This commit is contained in:
Nexus 2024-05-01 20:22:47 +01:00
parent f6c74d05d3
commit 620df52b6d
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -53,7 +53,7 @@ class KumaThread(KillableThread):
self.retries += 1 self.retries += 1
url = self.url url = self.url
if url.endswith("ping="): if url.endswith("ping="):
url += str(round(bot.latency, 2)) url += str(round(bot.latency * 1000, 2))
if bot.is_ready() is False: if bot.is_ready() is False:
url = url.replace("status=up", "status=down") url = url.replace("status=up", "status=down")
url = url.replace("msg=OK", "msg=Bot%20not%20ready") url = url.replace("msg=OK", "msg=Bot%20not%20ready")
@ -71,7 +71,7 @@ class KumaThread(KillableThread):
end_time = time.time() end_time = time.time()
timeout = self.interval - (end_time - start_time) timeout = self.interval - (end_time - start_time)
if self.previous is False: if self.previous is False:
timeout = 10 timeout = 2.5
self.kill.wait(timeout) self.kill.wait(timeout)