mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-10 16:05:58 +00:00
fix: don't fail flow on AlreadyCompleted after zombie restart (#9214)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
49ebf6f8ba
commit
8b7f7b37bd
@@ -683,6 +683,19 @@ pub async fn handle_receive_completed_job(
|
||||
.await;
|
||||
|
||||
match processed_completed_job {
|
||||
// The job was already completed by another worker (e.g. this worker was
|
||||
// declared a zombie and the job restarted+finished elsewhere, then this
|
||||
// worker caught up). The job genuinely succeeded; routing this through
|
||||
// `handle_job_error` would propagate a spurious "AlreadyCompleted"
|
||||
// failure up the parent flow. Drop it instead, mirroring the
|
||||
// `JobOutcome::AlreadyCompleted` guard on the execution path.
|
||||
Err(err @ Error::AlreadyCompleted(_)) => {
|
||||
tracing::info!(
|
||||
job_id = %job.id,
|
||||
"job already completed by another worker, skipping result processing: {err:#}"
|
||||
);
|
||||
None
|
||||
}
|
||||
Err(err) => {
|
||||
handle_job_error(
|
||||
db,
|
||||
|
||||
Reference in New Issue
Block a user