PHPackages                             lekongkong/lgequeue - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. lekongkong/lgequeue

ActiveLibrary[Queues &amp; Workers](/categories/queues)

lekongkong/lgequeue
===================

laravel graceful exit queue

06PHP

Since Jul 5Pushed 9y agoCompare

[ Source](https://github.com/LekongKong/LgeQueue)[ Packagist](https://packagist.org/packages/lekongkong/lgequeue)[ RSS](/packages/lekongkong-lgequeue/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (1)Used By (0)

LgeQueue
========

[](#lgequeue)

laravel graceful exit queue

usage scenario
==============

[](#usage-scenario)

### need the queue to exit

[](#need-the-queue-to-exit)

The recommanded method to graceful restart a queue is using these commands

```
php artisan down
php artisan queue:restart

```

But, sometimes, we still want the queue to autoexit when necessary. For example, our team using docker to deploy the software want to determine the queue worker has finished current job and stop doing anything before we remove the old version and deploy a new one.

### use multi-processes to run queue

[](#use-multi-processes-to-run-queue)

When some queue has more jobs than others, it may be good to set it to an indenpendent process. We make a new artisan command to make such complex supervisor configurations.

install
=======

[](#install)

1. You can install with composer

    composer reqiure lekongkong/lgequeue
2. Please replace the queue service provider, done.

config
======

[](#config)

Add this config sample to your `queue.php` config file.

```
'supervisor' => [

	//the dir to put logs of supervisor and jobs
    'logs' => '/var/logs',

	//the artisan file path
    'artisan' => '/path/to/artisan',

	// the dir where you store jobs
    'jobs' => '/path/to/Jobs',

	//jobs in one group will be put in one processes
    'groups' => [
        [
            'jobs' => [\app\Jobs\SendPush::class],
        ],
        [
            'jobs' => [\app\Jobs\AfterAdSaved::class, \app\Jobs\SelectAd::class, \app\Jobs\SendChatMessage::class],
            'processNum' => 1,
        ],
    ],
],

```

### addtional config

[](#addtional-config)

you may add a new config `handler` to `failed` in `queue.php`, which will enable your own failed job provider.

```
'failed' => [
    'handler' => \LgeQueue\FailedJobProvider::class
],

```

usage
=====

[](#usage)

### make supervisor config and start

[](#make-supervisor-config-and-start)

```
php artisan superconf > supervisor.conf
supervisord -c supervisord.conf

```

### call the queue processes to exit

[](#call-the-queue-processes-to-exit)

```
php artisan down

```

coding tips
===========

[](#coding-tips)

- You can extend the `Job` class of this repo rather than the original one, which containing a convenient method `onSelf` to push the job to the queue named by its class. Otherwise you may have to adjust the `groups` config to add your own queue name, not the class name as in sample.
- Besides the grouped jobs queue processes, there will be a default queue process using the default queue name, configed in `queue.php`.
- Tested in redis queue backend, should work appropriate on other backend.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6405755?v=4)[曹维杰](/maintainers/jswh)[@jswh](https://github.com/jswh)

---

Top Contributors

[![jswh](https://avatars.githubusercontent.com/u/6405755?v=4)](https://github.com/jswh "jswh (8 commits)")

### Embed Badge

![Health badge](/badges/lekongkong-lgequeue/health.svg)

```
[![Health](https://phpackages.com/badges/lekongkong-lgequeue/health.svg)](https://phpackages.com/packages/lekongkong-lgequeue)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.5M30](/packages/league-geotools)[illuminate/bus

The Illuminate Bus package.

6045.5M508](/packages/illuminate-bus)[uecode/qpush-bundle

Asynchronous processing for Symfony using Push Queues

1672.5M2](/packages/uecode-qpush-bundle)[jayazhao/think-queue-rabbitmq

为 ThinkPHP5.1 队列增加 RabbitMQ 驱动

141.5k](/packages/jayazhao-think-queue-rabbitmq)[mayconbordin/l5-stomp-queue

Stomp Queue Driver for Laravel 5

121.1k](/packages/mayconbordin-l5-stomp-queue)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
