Skip to content

feat: Run due-job polling via PollScheduler#41

Merged
paxuclus merged 2 commits into
mainfrom
feat/reduce-worker-cpu
Jun 19, 2026
Merged

feat: Run due-job polling via PollScheduler#41
paxuclus merged 2 commits into
mainfrom
feat/reduce-worker-cpu

Conversation

@stephanschuler

Copy link
Copy Markdown
Member

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-polling as a Composer dependency.
  • Replaced the direct periodic timer-based polling with PollScheduler (start/stop lifecycle).
  • Extended queueDueJobs() to optionally receive a PollScheduler and 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.

Comment thread Classes/Command/SchedulerCommandController.php Outdated
Comment thread Classes/Command/SchedulerCommandController.php
stephanschuler and others added 2 commits June 18, 2026 18:48
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
stephanschuler force-pushed the feat/reduce-worker-cpu branch from fb2bade to 4b9c132 Compare June 18, 2026 16:48
@stephanschuler
stephanschuler marked this pull request as ready for review June 19, 2026 06:52
@stephanschuler
stephanschuler requested a review from paxuclus June 19, 2026 06:56
@paxuclus
paxuclus merged commit 0d8ca79 into main Jun 19, 2026
24 of 48 checks passed
@paxuclus
paxuclus deleted the feat/reduce-worker-cpu branch June 19, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants