https://github.com/synergitech/queue
https://github.com/synergitech/queue
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/synergitech/queue
- Owner: SynergiTech
- License: mit
- Created: 2017-06-09T13:16:50.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T19:38:52.000Z (about 5 years ago)
- Last Synced: 2025-10-25T13:16:28.658Z (8 months ago)
- Language: PHP
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# synergitech/queue
> An abstraction over RabbitMQ for use in FuelPHP.
## Installation
```
$ composer require synergitech/queue
```
## Usage
```php
class MyTask
{
public static function sum(...$args)
{
return array_sum($args);
}
}
Queue\Task::enqueue([MyTask::class, 'sum'], [2, 4], 3); # 6
```
## Configuration
* `autorun` _(array)_ a list of environments where the job is executed immediately, rather
than enqueuing a job in RabbitMQ. Defaults to `['development']`, which means that
**by default, jobs will immediately execute in development**.
* `queue.host` _(string)_ the host where your RabbitMQ instance can be found, defaults to `'127.0.0.1'`
* `queue.port` _(int)_ the port where your RabbitMQ instance can be found, defaults to `5672`
* `queue.user` _(string)_ the RabbitMQ username, defaults to `'guest'`
* `queue.password` _(string)_ the RabbitMQ password, defaults to `'guest'`
* `queue.vhost` _(string)_ the RabbitMQ virtual host, defaults to `'/'`