Problem/Motivation

Three parts of hook_cron do unbounded synchronous remote work before core gets to run the queues:

  • CycleEngine::settleOpenCharges() loads every stale charge and re-submits each to its connector inline.
  • The expiry sweep calls CycleEngine::end() per expired charge-based subscription, which calls the remote cancellation service, one connector call per row.
  • DunningManager::sweepSuspensions() loads all past-due subscriptions whose grace has ended and, per row, saves the user, dispatches an event and sends mail.

All three use a single loadMultiple() with no range. Under automated cron (web-request time limit) or a slow provider, cron is aborted before processQueues(), so billing, retries and login reconciliation stall precisely during the provider outage the sweep exists for.

Proposed resolution

Remaining tasks

  • Design pass on queue layout; implementation; tests; no change record unless Drush options change.

User interface changes

None.

API changes

Possibly new queue worker plugin ids.

Data model changes

None.

Comments

colan created an issue.