decreased render time and fixed clear all
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Andre Henriques 2023-04-14 19:25:28 +01:00
parent 8f915d1020
commit 9ce96269df
3 changed files with 4 additions and 3 deletions

View File

@ -406,7 +406,7 @@ pub async fn clear(
} }
#[get("/clearall")] #[get("/clearall")]
pub async fn clearAll(action: &State<ASender<Action>>) -> String { pub async fn clear_all(action: &State<ASender<Action>>) -> String {
let r = action.lock().unwrap().send(Action::Clear); let r = action.lock().unwrap().send(Action::Clear);
if r.is_err() || r.ok().is_none() { if r.is_err() || r.ok().is_none() {

View File

@ -354,7 +354,8 @@ async fn main() -> GResult {
animations::start_animation, animations::start_animation,
animations::stop_animation, animations::stop_animation,
animations::clear, animations::clear,
animations::delete animations::delete,
animations::clear_all,
], ],
) )
.manage(conn_pool_arc.clone()) .manage(conn_pool_arc.clone())

View File

@ -343,7 +343,7 @@ impl Render {
self.last = data.clone(); self.last = data.clone();
} }
if time - self.last_update < 100 { if time - self.last_update < 10 {
println!("To Fast! Skiping"); println!("To Fast! Skiping");
return; return;
} }