Generated with the help of an LLM.
Problem/Motivation
The current hook_cron implementation sends one batch of 100 updates per run, so a bulk re-queue drains over hours, and the push-all Drush command can collide with cron — both remove rows before sending them.
Proposed resolution
- Replace hook_cron() with a cron-enabled QueueWorker driven by wake-up items:
- one wake-up stands for the whole backlog, not one per update.
- Per invocation the worker drains successive batches of 100 up to a configurable cap (default three, on the feed settings form)
- establish a best-effort 120-second deadline - stop new submissions at 30 seconds to reserve 90 for verification.
- When backlog remains at the deadline, suspend the queue and release the wake-up for a later run.
- A State API marker coalesces wake-ups under a short-lived lock, biased toward a redundant wake-up over a missing one.
- A persistent ownership row enforces the single-drainer rule between worker and Drush command
- recovery is operator-driven through new repair and recovery commands
- dynamic-yield:status gains owner and queue visibility.
- Routine empty-result verification warnings are dropped.
- Testing uses one seam:
- kernel tests running cron against the priority table
- faking the HTTP client
- injecting Drupal's time service.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork dynamic_yield-3635077
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
fathershawn