Added Uptime Kuma Push
This commit is contained in:
parent
649d575324
commit
08786bdd69
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue