Download the PHP package rpq/client without Composer

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

Redis Priority Queue Client

Travis CI

RPQ-Client is a priority task queue implementation in Redis written in pure PHP. This repository contains the Client codebase which can be used to schedule jobs from applications. Additionally, this codebase is used by the RPQ Server implementation to work with and process jobs.

Note that this codebase is constantly evolving. Until a tagged release is made, the API may change at any time.

Installation

RPQ-Client can be added to your application via Composer.

Note that RPQ-Client requires PHPRedis.

Usage

The RPQ Client comes with several options to instantiate the queue. To begin using the RPQ client, connect to your Redis instance, then pass that Redis instance to the RPQ\Client object.

Adding Jobs

Jobs can be scheduled for immediate execution simply by pushing a Fully Qualified Class Name to the queue.

Job arguments can be a complex array. As long as the details are JSON serializable, it can be passed to RPQ. Jobs have a default priority of 1. Jobs with a higher priority will execute before jobs with a lower priority. The priority may range from PHP_INT_MIN to PHP_INT_MAX.

Retries may either be defined as a boolean or as an integer. If retry is set to true, the job will be continuously rescheduled until it passes. If retry is set to false, no attempt will be made to retry the job. If retry is set to an integer, exactly n retries will be attempted, after which the job will be failed.

After pushing a job onto the stack, the push method will return a Job instance which can be used to determine the status and other information of the job.

Note that complex Objects should NOT be passed as an arguement. If you need to access a complex object, you should re-instantiate it within your job class.

Future Scheduling

Jobs may be scheduled in the future by specifying the at parameter, which represents a unix timestamp of the time you wish for the job to execute at.

Note that the at parameter declares the earliest a job will execute, and does not guarantee that a job will execute at that time. The scheduler will prioritize future jobs when possible, but other jobs may have priority over it depending upon the priority. If you require exact timining, the job should have a priority of PHP_MAX_INT, and you should ensure that your job queue has sufficient workers to prevent the job execution from being delayed.

Queue Statistics

Details about the queue can be retrieved as follows:

The stats command will return an array containing the number of elements in the queue, and details about the passed, failed, canceled, and retried jobs for the given day.

To retrieve stats for a different day, call get() with a Y-m-d formatted date.

Job Details


All versions of client with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
ext-redis Version ^3.1.2 || ^4.0.2
ramsey/uuid Version ^3.7
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 rpq/client contains the following files

Loading the files please wait ....