Download the PHP package netlogix/jobqueue-polling without Composer

On this page you can find all versions of the php package netlogix/jobqueue-polling. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package jobqueue-polling

Netlogix.JobQueue.Polling

This package provides a small, dependency-free poll scheduler for ReactPHP based job workers.

There are two main goals:

  1. Poll for new work on a baseline interval without burning CPU when idle.
  2. Pick up freed capacity immediately after a job finishes, without waiting for the next interval — while never starting more work in parallel than allowed.

It is the shared polling core used by both Netlogix.JobQueue.FastRabbit (one job at a time per worker) and Netlogix.JobQueue.Scheduled (N jobs in parallel).

Installation

The problem it solves

A naive worker either polls aggressively (high CPU even when there is nothing to do) or only on a slow interval (low throughput, because a freed slot waits up to one interval before the next job is picked up).

PollScheduler combines a periodic baseline poll with an on-demand "immediate" poll that callers trigger when a job completes. Immediate polls are coalesced to a single pending future tick, and every poll is gated by a capacity check, so a burst of completions racing the periodic timer can never start more work than capacity allows.

The correctness invariant: the capacity check and the slot occupation done inside $tryToPickUpWork run synchronously within a single, uninterrupted loop frame (ReactPHP is single threaded, no await in between). Therefore any number of stacked or racing polls collapse to "fill up to capacity, then bail".

Usage

PollScheduler is DI-free — instantiate it with new or the static create() factory, also from a standalone worker binary that has no Flow object management.

$tryToPickUpWork is responsible for respecting capacity itself. The two canonical shapes:

The scheduler's own capacity pre-check is an early-out; the callback's internal limit is the authoritative bound.

API


All versions of jobqueue-polling with dependencies

PHP Build Version
Package Version
Requires react/event-loop Version ^1.5
php Version ~8.2 || ~8.3 || ~8.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package netlogix/jobqueue-polling contains the following files

Loading the files please wait ...