An open API service indexing awesome lists of open source software.

https://github.com/leafsphp/queue

🛠️ [WIP] Queue/Worker implementation for Leaf
https://github.com/leafsphp/queue

Last synced: 5 months ago
JSON representation

🛠️ [WIP] Queue/Worker implementation for Leaf

Awesome Lists containing this project

README

          








Leaf Queue


Latest Stable Version
Total Downloads
License





Implementing a queuing system from scratch can be a daunting task, and can take a lot of time. For this reason, Leaf aims to provide a unified API for using queues across a variety of different backends, such as Amazon SQS, BeanStalk, Redis, or a database of your choice.

## Basic Usage

In simple terms, this package allows you to push "heavy" tasks into a queue and run them in the background. This is useful for tasks that take a long time to complete, such as sending emails, processing images, etc.

We try to simplify the process of creating and running queues as much as possible, so, for most of the time, you'll only need to create your jobs and run the queue from the command line.

### Creating a Job

Jobs are basically classes that extend the `Leaf\Queues\Job` class. They must implement the `handle` method, which is called when the job is run.

```php