diff --git a/src/main.rs b/src/main.rs index 8b46999..06f0635 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,11 +73,15 @@ fn main() -> Result<()> { } } - Ok(None) => info!("No job found"), + Ok(None) => { + info!("No job found"); + std::thread::sleep(Duration::from_secs(APP_CONFIG.load_duration)); + } - Err(err) => error!("Unexpected HTTP error: {err}"), + Err(err) => { + error!("Unexpected HTTP error: {err}"); + std::thread::sleep(Duration::from_secs(APP_CONFIG.load_duration)); + } } - - std::thread::sleep(Duration::from_secs(APP_CONFIG.load_duration)); } }