1
Fork 0

reenabled autoschedule

This commit is contained in:
Andy Killorin 2023-12-23 20:10:02 -06:00
parent 50d24c8ea8
commit 143f32ee5b
Signed by: ank
GPG key ID: B6241CA3B552BCA4

View file

@ -211,11 +211,12 @@ pub(crate) async fn command(
Some(command) => command,
None => {
tokio::spawn(async move {
//let state = &state.clone();
//if Instant::elapsed(&state.clone().read().await.started).as_secs_f64() > STARTUP_ALLOWANCE {
// let schedule = &mut state.write().await.tasks;
// schedule.poll().await;
//}
let state = &state.clone();
if Instant::elapsed(&state.clone().read().await.started).as_secs_f64() > STARTUP_ALLOWANCE {
let schedule = &mut state.write().await.tasks;
trace!("idle, polling");
schedule.poll().await;
}
});
turtle::TurtleCommand::Wait(IDLE_TIME)
},