dev-master
9999999-devGeneric queue
MIT
The Requires
- php >=5.5
- psr/log-implementation ^1.0.0
The Development Requires
0.1.0
0.1.0.0Generic queue
MIT
The Requires
- php >=5.5
- psr/log-implementation ^1.0.0
The Development Requires
Wallogit.com
2017 © Pedro Peláez
Generic queue
This library is a Queueing Aystem abstraction layer. It enables you to implement any queueing system in your application, without having to depend on the actual implementation of the queueing system you choose., (*2)
Attention: You will need a Process Control System like supervisord to keep your workers going., (*3)
Queueing system, (*4)
Say you want to notify multiple users when a new comment is placed on a forum thread. Sending these email on the spot might slow down your application significantly when many emails need to be send. When using a Queueing System you can delay this action by adding the Jobs to a Queue. A worker will pick up these Jobs asynchronously from you web process. This way your application is future proof and you will have a much easier time scaling in the future., (*5)
Library, (*6)
When you decide to use this library, you do not depend on the queueing system implementation. You can plug the driver of your choice. You might choose a basic mysql version to get started and when you need more performance go for something like beanstalkd or RabbitMQ., (*7)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Queue\Queue;
use Queue\Job\Job;
use Queue\Executor\JobExecutor;
$driver = new QueueDriver(); // Use your driver.
$queue = new Queue($driver);
// Add a job to the queue
$queue->addJob(new Job('notify_forum_thead', ['threadId' => 12]));
<?php require_once(__DIR__ . '/vendor/autoload.php'); use Queue\Queue; use Queue\Worker\Worker; $driver = new QueueDriver(); // Use your driver. $queue = new Queue($driver); $worker = new Worker($queue, new JobExecutor(), 1); $worker->run();
Run this command to get the latest version from packagist:, (*8)
$ composer require queue/queue
All code contributions - including those of people having commit access - must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code., (*9)
Fork the project, create a feature branch, and send us a pull request., (*10)
To ensure a consistent code base, you should make sure the code follows the Coding Standards which we borrowed from Symfony. Make sure to check out php-cs-fixer as this will help you a lot., (*11)
If you would like to help, take a look at the list of issues., (*12)
PHP 5.5 or above, (*13)
Dries De Peuter - dries@nousefreak.be - http://nousefreak.be, (*14)
See also the list of contributors who participated in this project., (*15)
Cron is licensed under the MIT license., (*16)
Generic queue
MIT
Generic queue
MIT