Skip to content

feat: leave the Laravel queue out of auto until a connection is set for async actions - #429

Merged
ogorzalka merged 1 commit into
developfrom
feat/async-queue-opt-in
Oct 7, 2026
Merged

ogorzalka merged 1 commit into
developfrom
feat/async-queue-opt-in

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Follow-up to #427: the Laravel queue becomes opt-in for auto.

Why. The skeleton ships QUEUE_CONNECTION=database. With the queue first in auto (as #427 did, following the design doc), every async action of a default Pollora project went to the database queue and waited for a worker. On hosting without one, handlers never ran, with no error anywhere. A handler that silently never runs is the worst failure mode. The framework already treats the Laravel scheduler as opt-in (wordpress.use_laravel_scheduler), so this is consistent.

Now.

  • auto puts the queue first only when hooks.async.queue.connection (HOOKS_ASYNC_CONNECTION) names the connection a worker runs. A sync or null connection is still skipped.
  • Without it, auto picks Action Scheduler, then WP-Cron, which run without any extra process.
  • via('queue'), #[Async(via: 'queue')] and HOOKS_ASYNC_DRIVER=queue still use the default connection: an explicit choice.
  • config/hooks.php and the CHANGELOG explain it. The design doc is updated.

Tests. The provider test covers "no connection set: wp-cron despite a database default connection", "set: queue", and "set to sync: skipped". The E2E spec uses via: 'queue' and is unaffected.

@ogorzalka
ogorzalka merged commit cdd5ff1 into develop Oct 7, 2026
11 checks passed
@ogorzalka
ogorzalka deleted the feat/async-queue-opt-in branch October 7, 2026 16:46
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.

1 participant