PHPackages                             honcho/craft-queue-bouncer - 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. honcho/craft-queue-bouncer

ActiveCraft-plugin[Queues &amp; Workers](/categories/queues)

honcho/craft-queue-bouncer
==========================

Prevent repeat jobs from being added to the queue

1.0.3(1mo ago)013↓90%mitPHPPHP &gt;=8.2CI failing

Since Mar 27Pushed 1mo agoCompare

[ Source](https://github.com/honchoagency/craft-queue-bouncer)[ Packagist](https://packagist.org/packages/honcho/craft-queue-bouncer)[ RSS](/packages/honcho-craft-queue-bouncer/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (4)Dependencies (6)Versions (8)Used By (0)

[![Banner](./docs/img/banner.png)](./docs/img/banner.png)

Queue Bouncer for Craft CMS
===========================

[](#queue-bouncer-for-craft-cms)

A Craft CMS plugin that prevents duplicate jobs from piling up in the queue. If a matching job is already pending or running, Queue Bouncer skips the callback silently.

The Problem
-----------

[](#the-problem)

Cron-triggered jobs can overlap. For example if a regular FeedMe import takes longer than its cron interval, a second job gets queued before the first finishes. Over time this creates a backlog that compounds the problem.

Queue Bouncer sits in front of your cron commands and acts as a gatekeeper - only running the callback function if there are no matching jobs in the queue.

Configuration
-------------

[](#configuration)

Copy `config.php` to `config/queuebouncer.php` and define your guarded jobs:

```
// config/queuebouncer.php
return [
    'feed-me-import' => [
        'skipClasses' => [
            \craft\feedme\queue\jobs\FeedImport::class,
        ],
        'callback' => function () {
            $feed = FeedMe::getInstance()->getFeeds()->getFeedById(1);
            if ($feed) {
                Queue::push(new FeedImport(['feed' => $feed]));
            }
        },
    ],
];
```

Each top-level key is an identifier you pass to the console command. A config entry supports these keys:

KeyDescription`skipClasses`Array of fully-qualified job class names. The callback is skipped if **any** are pending or running. Best for the simple case where the class name alone identifies the job.`skipIf`A callable returning `true` to skip the callback. Use this when you need finer control — for example to allow concurrent jobs of the same class but different feeds. **Takes precedence over `skipClasses` when present.**`callback`PHP callable invoked when the bouncer gives the green light. Omit it if you'd rather chain commands with `&&` in cron.### Advanced: `skipIf`

[](#advanced-skipif)

`skipIf` is useful when `skipClasses` is too broad. For example, if you run separate imports for multiple FeedMe feeds and want each one guarded independently:

```
'feed-me-import-17' => [
    'skipIf' => function () {
        // Only block if feed #17 is specifically already queued.
        return (new \yii\db\Query())
            ->from(\craft\db\Table::QUEUE)
            ->where(['fail' => false])
            ->andWhere(['like', 'job', 'FeedImport'])
            ->andWhere(['like', 'job', '"id";i:17'])
            ->exists();
    },
    'callback' => function () {
        $feed = FeedMe::getInstance()->getFeeds()->getFeedById(17);
        if ($feed) {
            Queue::push(new FeedImport(['feed' => $feed]));
        }
    },
],

'feed-me-import-42' => [
    'skipIf' => function () {
        return (new \yii\db\Query())
            ->from(\craft\db\Table::QUEUE)
            ->where(['fail' => false])
            ->andWhere(['like', 'job', 'FeedImport'])
            ->andWhere(['like', 'job', '"id";i:42'])
            ->exists();
    },
    'callback' => function () {
        $feed = FeedMe::getInstance()->getFeeds()->getFeedById(42);
        if ($feed) {
            Queue::push(new FeedImport(['feed' => $feed]));
        }
    },
],
```

Both keys can run concurrently — `feed-me-import-17` won't block `feed-me-import-42`.

Usage
-----

[](#usage)

Replace your existing cron command with the Queue Bouncer equivalent:

```
# Before
php craft feed-me/feeds/queue 1

# After
php craft queue-bouncer/queue feed-me-import
```

Queue Bouncer will:

1. Evaluate `skipIf` (if configured) — if it returns `true`, exit cleanly.
2. Otherwise check `skipClasses` — if any matching job is pending or running, exit cleanly.
3. If neither condition triggered, invoke the `callback`.

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance90

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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.

###  Release Activity

Cadence

Every ~9 days

Total

6

Last Release

50d ago

Major Versions

0.0.2 → 1.0.02026-04-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/27c3ca3e93fbb9431fb116eb9b07355afb564406251ea4263f84699087be1298?d=identicon)[bart-honcho](/maintainers/bart-honcho)

---

Top Contributors

[![mijewe](https://avatars.githubusercontent.com/u/1457786?v=4)](https://github.com/mijewe "mijewe (9 commits)")

### Embed Badge

![Health badge](/badges/honcho-craft-queue-bouncer/health.svg)

```
[![Health](https://phpackages.com/badges/honcho-craft-queue-bouncer/health.svg)](https://phpackages.com/packages/honcho-craft-queue-bouncer)
```

###  Alternatives

[spicyweb/craft-neo

A Matrix-like field type with block hierarchy

393808.8k10](/packages/spicyweb-craft-neo)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293952.6k29](/packages/craftcms-feed-me)[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k59](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k17](/packages/solspace-craft-freeform)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)[verbb/vizy

A flexible visual editor field for Craft.

4249.7k](/packages/verbb-vizy)

PHPackages © 2026

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