Added Uptime Kuma Push

This commit is contained in:
Neshura 2023-07-29 02:36:40 +02:00
parent 649d575324
commit 08786bdd69
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -96,9 +96,10 @@ impl Bot {
} }
pub(crate) fn idle(&self) { pub(crate) fn idle(&self) {
while Utc::now().time() - self.start_time.time() < chrono::Duration::seconds(60) { while Utc::now().time() - self.start_time.time() < chrono::Duration::seconds(30) {
sleep(time::Duration::from_secs(10)); sleep(time::Duration::from_secs(10));
} }
let _ = reqwest::blocking::get("https://status.neshweb.net/api/push/7s1CjPPzrV?status=up&msg=OK&ping=");
} }
pub(crate) fn print_info(&self) { pub(crate) fn print_info(&self) {
@ -143,6 +144,7 @@ fn run_bot() {
// Enter a loop (not for debugging) // Enter a loop (not for debugging)
loop { loop {
this.idle();
this.run_once(old); this.run_once(old);
this.print_info(); this.print_info();
this.idle(); this.idle();