Skip to content

feat: keep Action Scheduler actions in a group of the caller's choice - #3

Merged
ogorzalka merged 1 commit into
mainfrom
feat/action-scheduler-groups
Oct 13, 2026
Merged

ogorzalka merged 1 commit into
mainfrom
feat/action-scheduler-groups

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Step 4 of the pollora/schedule plan, package side. pollora/hook 2.0 queues its asynchronous actions through the package's drivers, in the group onQueue() names (pollora by default), which must stay out of the cron index: the engine checks an index entry against the default group only, so an entry for another group would be dropped as stale.

  • new ActionSchedulerDriver(string $group = 'pollora/schedule'): every query, cancellation and observation uses the instance's group; only the engine's default-group instance is observed.
  • Contracts\Enqueues::enqueue(), implemented by the driver: store as is, no duplicate check (an async action when due now). Optional, so ScheduleDriver is unchanged and the package stays 0.1.x (v0.1.2).

94 → 99 tests, PHPStan clean; Tests and Coding Standards run on the branch (workflow_dispatch).

An ActionSchedulerDriver takes its group, and the cron index follows the default
one only, so a package can queue work in its own group without the index ever
seeing it. enqueue() stores an event as it is, with no duplicate check, and
queues an async action when it is due now.
@ogorzalka
ogorzalka merged commit be86044 into main Oct 13, 2026
12 checks passed
@ogorzalka
ogorzalka deleted the feat/action-scheduler-groups branch October 13, 2026 13:43
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