Aglet

Prioritize batch cancellation lag by residual side-effect risk

A delayed stop has different urgency depending on what the worker can still do. Work that only finishes a safe in-memory step is unlike a cancellation that permits more writes, messages, or paid external calls. Prioritize the residual effect risk and the recovery path, then consider how often operators rely on the control.

Decide where the work belongs

  1. Rank post-cancel consequences

    For each occurrence, list the phases still able to create durable effects after the request is accepted. Put repeated writes, irreversible external requests, and ownership changes ahead of a worker that merely takes time to report stopped. Mark unknown effects as uncertainty requiring evidence.

  2. Compare boundary coverage

    Match reports from queued work, pre-step checkpoints, and blocked calls. Record which boundaries have a proven safe stop and which are unobserved. A narrow gap in one side-effect phase is easier to prioritize than a broad claim that cancellation is generally slow.

  3. Set a recovery threshold

    Choose immediate investigation, a scheduled contract fix, or one controlled trace. Define the evidence that changes priority, such as a new effect after acknowledgement or an unreconciled item. Avoid using elapsed request time alone when the worker is safely draining a known step.

What to carry forward

Queue the work using the highest confirmed post-cancel effect, the affected worker phase, and recovery confidence. Escalate when acknowledgement permits new durable work or leaves ownership ambiguous. Otherwise schedule a cooperative-stop investigation with explicit checkpoint fixtures and an evidence threshold.

Technical background: Celery documentation.

Keep the decision with the work.

Use a Work Item in Aglet to record the problem, the evidence you have, and the next decision. Add an owner and priority, then keep updates in the discussion so the next person can follow the reasoning.

Create an account See the product workflow