PHPackages                             leafs/queue - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. leafs/queue

ActiveLibrary[Framework](/categories/framework)

leafs/queue
===========

A simple queue library for Leaf PHP

v4.2(8mo ago)43081[1 issues](https://github.com/leafsphp/queue/issues)MITPHPCI passing

Since Sep 9Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/leafsphp/queue)[ Packagist](https://packagist.org/packages/leafs/queue)[ Docs](https://leafphp.dev/modules/queues/)[ GitHub Sponsors](https://github.com/leafsphp)[ Fund](https://opencollective.com/leaf)[ RSS](/packages/leafs-queue/feed)WikiDiscussions v4.x Synced 2d ago

READMEChangelog (7)Dependencies (5)Versions (10)Used By (0)

 [![](https://camo.githubusercontent.com/d98ee5e32c2ff016fdfdac6c42654a908f4cc34b229c7b00caacc5a717455ae8/68747470733a2f2f6c6561667068702e6465762f6c6f676f2d636972636c652e706e67)](https://camo.githubusercontent.com/d98ee5e32c2ff016fdfdac6c42654a908f4cc34b229c7b00caacc5a717455ae8/68747470733a2f2f6c6561667068702e6465762f6c6f676f2d636972636c652e706e67)

Leaf Queue
==========

[](#leaf-queue)

 [![Latest Stable Version](https://camo.githubusercontent.com/8876edd7f2816dea5f1a5cf8e9aaa1527bfe261ac9e72a2efda31042367443cd/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f71756575652f762f737461626c65)](https://packagist.org/packages/leafs/queue) [![Total Downloads](https://camo.githubusercontent.com/ec62b89ec835977643daad8933d83f5ccf010b445dc6aec306a3434781bd9616/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f71756575652f646f776e6c6f616473)](https://packagist.org/packages/leafs/queue) [![License](https://camo.githubusercontent.com/b862c7b970f8bac32fd62665b45bdb9a11b511f9e32292cad1481283ab7a09e3/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f71756575652f6c6963656e7365)](https://packagist.org/packages/leafs/queue)

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
-----------

[](#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

[](#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.

```
