Skip to content

fix: keep tracking tasks across worker restarts #279

Closed

Description

@uniqueg

Problem

Nothing in proTES or in FOCA's create_celery_app sets acks_late or reject_on_worker_lost, so the broker message of a tracking task is acknowledged when tracking starts. When a worker is replaced (every Helm upgrade or configuration change rolls the workers), it gets 30 seconds of warm shutdown and is then killed, and the tasks it was tracking are never tracked again: they keep their last state, e.g. RUNNING, forever.

docs/operations.md describes this correctly, but the comment on worker.terminationGracePeriodSeconds in deployment/values.yaml, which also goes into the generated chart README, says the opposite: "tasks that are killed are not acknowledged, so the broker delivers them again".

Found in the pre-release review of v0.3.0 (finding 5).

Proposed change

  • Acknowledge tracking messages late (acks_late, reject_on_worker_lost), so that the broker delivers them again if a worker is lost; with rescheduling (fix: track tasks without blocking workers #277), each message covers one poll only.
  • When a worker starts, re-enqueue the tracking of stored unfinished tasks that have a backend, and make sure that a task is tracked by one chain of polls only.
  • Correct the comment in deployment/values.yaml and the chart README, and update docs/operations.md and docs/upgrading.md.

Activity

  1. added
    priority: high
    status: in progress
    type: bug
    workload: hours
    on Oct 23, 2026
  2. removed
    status: in progress
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: hightype: bugworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions