Repository navigation
feat!: queue through the drivers of pollora/schedule - #19
Merged
Merged
Conversation
WP-Cron and Action Scheduler are the drivers of pollora/schedule, which the package now requires. ScheduledDriver keeps what is the hook's own, and Recovery the daily task. Work queued by 1.x runs unchanged. Async\Drivers\WpCronDriver and ActionSchedulerDriver are removed, with no alias.
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.
pollora/hook 2.0, step 4 of the pollora/schedule plan.
WP-Cron and Action Scheduler are the drivers of
pollora/schedule(v0.1.2, required).Async\Drivers\ScheduledDriverqueues through them and keeps what is the hook's own: the message an event carries and where the payload lives.Async\Recoveryis the daily task that wasWpCronDriver::recover().Breaking
Async\Drivers\WpCronDriverandActionSchedulerDriverare removed, with no alias (the framework does not use them).WpCronDriver::handles()/claim()arePayloadStore's; the recovery constants and methods areRecovery's.Unchanged
->async(),#[Async],Async::fake(),via()and their options; the hookpollora/async/run, the Action Scheduler groups (polloraor the queue name), identifier-only WP-Cron events and thepollora_async_options. Work queued by 1.x runs once 2.0 is installed: tested on a real WordPress (an event with its option, an action inpollora, one incrm, queued under 1.4.1, run under 2.0).Worth knowing
Async::listen()keepspollora/async/runandpollora/async/recoveron WP-Cron through thepollora/schedule/protected_hooksfilter, sovia('wp-cron')still means WP-Cron when the site gave pollora/schedule another driver. Checked live with the site on Action Scheduler.cronindex (which follows its default group only): the index would otherwise drop them as stale.available()also waits for Action Scheduler to be initialised, soautostill falls back to WP-Cron beforeaction_scheduler_init.264 tests, PHPStan clean.