feat: Run due-job polling via PollScheduler#41
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR integrates PollScheduler into the scheduled job polling loop so the scheduler can keep a periodic cadence while also triggering an immediate poll right after a job finishes (reducing latency between job executions without increasing configured polling frequency).
Changes:
- Added
netlogix/jobqueue-pollingas a Composer dependency. - Replaced the direct periodic timer-based polling with
PollScheduler(start/stop lifecycle). - Extended
queueDueJobs()to optionally receive aPollSchedulerand request an immediate poll on job completion.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| composer.json | Adds the polling scheduler package dependency required for immediate re-polling. |
| Classes/Command/SchedulerCommandController.php | Switches to PollScheduler for periodic + immediate polling and hooks immediate re-polling to job exit events. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The poll scheduler not only runs tasks at a certain interval but can be triggered to "run immediately". For example: - Check for new scheduled jobs every 100ms - but check immediately right after a scheduled job finishes
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
stephanschuler
force-pushed
the
feat/reduce-worker-cpu
branch
from
June 18, 2026 16:48
fb2bade to
4b9c132
Compare
stephanschuler
marked this pull request as ready for review
June 19, 2026 06:52
paxuclus
approved these changes
Jun 19, 2026
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.
The poll scheduler not only runs tasks at a certain interval but can be triggered to "run immediately".
For example: