Skip to content
SprecherEast
Issue 350

bug: A scheduled publish cut off mid-run is never retried

Back to our plan
Open
bugcmspriority: low

Type

bug

Summary

A scheduled publish cut off mid-run (for example by a deploy restart) stays "processing" forever, so that item never changes and nobody is told.

Problem

Payload 3.91 has no processing timeout and never picks up a job left processing (decision 0010). releaseStuckJobs (src/platform/payload/retentionJobs.ts) re-queues such jobs, but it is a beforeSchedule hook, so it only runs for tasks that schedule themselves: the retention tasks. schedulePublish jobs are queued by the Admin in the default queue, which no schedule touches (#141, decision 0011), so nothing releases them. A run takes milliseconds, so this needs a restart at exactly the wrong moment, but every deploy restarts the app. Found in the independent review of #346.

Proposed fix

Release stuck schedulePublish jobs the same way: for example a small hourly task in the retention queue whose handler runs the same release for the default queue, or generalize releaseStuckJobs to take the queue and task. Log a warning with the count only.

Acceptance criteria

  • Not done: A schedulePublish job left processing for over an hour is queued again and runs.
  • Not done: A test covers it.

Area

cms

Priority

priority: low


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab