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

  1. 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.
  2. 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.
  3. 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

Command icon 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

fathershawn created an issue. See original summary.

  • fathershawn committed 7286b6aa on 1.x
    task: #3635077 Make cron processing more robust
    
    By: fathershawn
    
fathershawn’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.