fix(backend): run flow error handler for flow step oom (#7484)

This commit is contained in:
hugocasa
2026-01-05 19:09:33 +07:00
committed by GitHub
parent ffd45af262
commit cc4e031870

View File

@@ -1611,7 +1611,10 @@ pub async fn monitor_db(
if server_mode && !initial_load {
if let Some(db) = conn.as_sql() {
if let Err(e) = cleanup_debounce_keys_for_completed_jobs(&db).await {
tracing::error!("Error cleaning up debounce keys for completed jobs: {:?}", e);
tracing::error!(
"Error cleaning up debounce keys for completed jobs: {:?}",
e
);
}
}
}
@@ -2351,7 +2354,7 @@ async fn handle_zombie_jobs(db: &Pool<Postgres>, base_internal_url: &str, node_n
memory_peak,
None,
error::Error::ExecutionErr(error_message),
true,
matches!(error_kind, ErrorMessage::SameWorker), // unrecoverable if the job is a same worker zombie
Some(&same_worker_tx_never_used),
"",
node_name,
@@ -2806,7 +2809,10 @@ RETURNING key,job_id
async fn cleanup_debounce_keys_for_completed_jobs(db: &DB) -> error::Result<()> {
// If min version doesn't support runnable settings, clean up debounce keys for completed jobs
if !*windmill_common::worker::MIN_VERSION_SUPPORTS_RUNNABLE_SETTINGS_V0.read().await {
if !*windmill_common::worker::MIN_VERSION_SUPPORTS_RUNNABLE_SETTINGS_V0
.read()
.await
{
let result = sqlx::query!(
"
DELETE FROM debounce_key