Download the PHP package tudorr89/phpqdrv without Composer

On this page you can find all versions of the php package tudorr89/phpqdrv. 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 phpqdrv

phpqdrv

A small, dependency-light queue system for PHP with interchangeable backends.

Features

Requirements

Installation

Then install the client for the backend you actually use:

Quick start

SQLite

Redis

PostgreSQL / MariaDB

Beanstalkd

Queue API

Job::getAttempts() reports the number of deliveries including the current one: a freshly pushed job reports 0, the first delivery reports 1.

Worker

work() is a daemon loop: it keeps polling forever (until maxJobs jobs were processed or stop() is called). For cron-style runs use processNext() in your own bounded loop.

Failure policy:

  1. The processor throws \Throwable → job is logged and release()d with a backoff of 1s, 2s, 4s… (capped at 300s).
  2. Once getAttempts() >= maxAttempts → fail() parks the job in the dead letter store.
  3. Infrastructure errors (queue unreachable) are logged and retried; the worker never dies.

Graceful shutdown: SIGTERM/SIGINT (when ext-pcntl is available) finish the in-flight job, then the loop returns. Call $worker->stop() from your processor to stop after the current job.

Reliability model

A job handed to a worker is reserved, not deleted:

Backend How a reserved job survives a dead worker
SQLite / MariaDB / PostgreSQL status = 'processing' + reserved_at; the worker periodically calls requeueExpired()
Redis body moved into a reserved sorted set scored by deadline; requeueExpired() puts it back
Beanstalkd the server's TTR handles it natively

Each driver takes a visibilityTimeout (default 300s) in its constructor. Set it slightly above your slowest job. Workers sweep every 30 seconds automatically.

fail() writes to a dead letter store per backend: a failed status for SQL, a {prefix}:{queue}:failed list for Redis, a {queue}.failed tube for Beanstalkd.

Payloads

Payloads are arrays encoded as JSON with strict error handling:

Payloads are stored as opaque JSON text on every backend, so they round-trip exactly. (PostgreSQL's JSONB would normalise key order; subclass PostgreSQLQueue and override payloadSelectExpression()/payloadParameter() if you want that trade-off.)

Schema

Drivers create their table/index on construction (ensureSchema()), idempotently. For production, pass ensureSchema: false and apply the DDL yourself:

All timestamps are integer microseconds since the epoch. status is one of pending, processing, completed, failed.

The underlying PDO is switched to ERRMODE_EXCEPTION — a queue that fails silently is worse than one that throws.

Running the tests

Redis, MariaDB and PostgreSQL tests are skipped unless their DSN is provided:

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Add tests and run composer check
  4. Open a Pull Request

License

MIT — see LICENSE.md.


All versions of phpqdrv with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
predis/predis Version ^2.0
ext-pdo Version *
pear/net_beanstalkd Version ^0.5.1
php-di/php-di Version ^7.0
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 tudorr89/phpqdrv contains the following files

Loading the files please wait ...