Repository navigation
feat: keep Action Scheduler actions in a group of the caller's choice - #3
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 (polloraby default), which must stay out of thecronindex: 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, soScheduleDriveris 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).