mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-12 08:05:44 +00:00
prevent forever loops nit
This commit is contained in:
@@ -2317,6 +2317,9 @@ pub async fn pull(
|
||||
tracing::warn!("Pull job loop count: {}", pull_loop_count);
|
||||
tokio::task::yield_now().await;
|
||||
}
|
||||
if pull_loop_count > 1000 {
|
||||
return Ok(PulledJobResult { job: None, suspended: false });
|
||||
}
|
||||
if let Some((query_suspended, query_no_suspend)) = query_o {
|
||||
let njob = {
|
||||
let job = if query_suspended.is_empty() {
|
||||
@@ -2523,6 +2526,10 @@ pub async fn pull(
|
||||
tracing::warn!("Window finding job loop count: {}", pull_loop_count);
|
||||
tokio::task::yield_now().await;
|
||||
}
|
||||
if i > 1000000000 {
|
||||
tracing::error!("Window finding job loop count exceeded 1000000000, breaking");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
tracing::info!("Job '{}' from path '{}' with concurrency key '{}' has reached its concurrency limit of {} jobs run in the last {} seconds. This job will be re-queued for next execution at {} (min_started_at: {min_started_at_or_now}, avg script duration: {:?}, number of time windows full: {})",
|
||||
|
||||
Reference in New Issue
Block a user