Skip to content

Drop a claimed task whose stored payload cannot be read - #90

Merged
codingjoe merged 1 commit into
mainfrom
codingjoe-reaper-payload-salvage
Oct 7, 2026
Merged

codingjoe merged 1 commit into
mainfrom
codingjoe-reaper-payload-salvage

Conversation

@codingjoe

Copy link
Copy Markdown
Owner

The reaper read the stored payload before deciding the fate of a task, so a payload the code can no longer read, a task function or retry callback that is gone, or a status a newer release wrote, raised on every pass. The claim script had already renewed the lease, so the task stayed in the running set and the same error repeated every CLAIM_TTL, and the inspector could not clear it.

  • Drop a claimed task the broker cannot read: log the read error with its traceback, and delete the stored payload.
  • Delete only the payload, not the running entry. A lease holder's late acknowledge still writes its result, and the reaper script sweeps the entry once the hash is gone.
  • Replace the import-error salvage from Fail tasks whose stored retry callback is gone from the code base #87, which patched and published the payload, with that one drop. The source file is a net deletion.
  • Document the behavior in the README.

Fixes #73

`_reap_task` deserialized the stored payload before it decided the fate of the
task. A payload with a task function, a retry callback, or a status the code
base does not know raised on every pass. The claim script had already renewed
the lease, so the task stayed in the running set and the same error repeated
every `CLAIM_TTL`.

- Drop a claimed task whose payload cannot be read any more: log the read error
  with its traceback, and delete the stored payload. The running entry stays, so
  a lease holder's late acknowledge still writes its result, and the reaper
  script sweeps the entry once the hash is gone.
- Document the behavior in the README.

Fix #73
@codingjoe
codingjoe merged commit 1a908f4 into main Oct 7, 2026
4 checks passed
@codingjoe
codingjoe deleted the codingjoe-reaper-payload-salvage branch October 7, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A stored payload that does not deserialize keeps the reaper in a loop

1 participant