PHPackages                             diegodevgroup/beanworkers - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. diegodevgroup/beanworkers

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

diegodevgroup/beanworkers
=========================

A way to dynamically control the number of processes that Supervisord will have running at any given time

1.0.0(9y ago)015MITPHPPHP &gt;=5.3.0

Since Feb 7Pushed 9y ago2 watchersCompare

[ Source](https://github.com/DiegoDevGroup/beanworkers)[ Packagist](https://packagist.org/packages/diegodevgroup/beanworkers)[ RSS](/packages/diegodevgroup-beanworkers/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Beanworkers
===========

[](#beanworkers)

This is a command line script to automatically update the number of processes in supervisord dynamically based on number of ready jobs in a beanstalk tube(s)

Usage is simple, but there are assumptions made. Please ensure you have a backup before attempting to use this code.

Assumptions
===========

[](#assumptions)

1. Supervisord programs are listed individually in separate ini files.
2. You are running this as a user that has access to edit ini files and run `supervisorctl`

Example
=======

[](#example)

```
$pheanstalk = new \Pheanstalk\Pheanstalk("$host:$port");
$worker = new Supervisord\Beanstalkd\Workers($pheanstalk, '/usr/bin/supervisorctl');
$worker->addIniFile('default', '/etc/supervisord.d/default.ini');
$worker->addRules('default', ['minimum_jobs' => 0, 'required_workers' => 1]);
$worker->addRules('default', ['minimum_jobs' => 10, 'required_workers' => 3]);
$worker->run();

```

In the above example, the worker gets the stats of the default tube, and if there are less than 10 jobs currently ready, it will set the numprocs to 1. If there are 10 or more, it will set numprocs to 3. It will then update supervisord via `supervisorctl`.

Add to cron
===========

[](#add-to-cron)

Your script should probably run every minute.

Add as many rules as you like, just keep your resources in mind as you do so.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3431d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11743859?v=4)[PHP Architect](/maintainers/phparch)[@phparch](https://github.com/phparch)

---

Top Contributors

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

---

Tags

beanstalksupervisord

### Embed Badge

![Health badge](/badges/diegodevgroup-beanworkers/health.svg)

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

###  Alternatives

[mikopbx/core

Free PBX system for SMB based on Asterisk

5501.4k](/packages/mikopbx-core)[in2code/in2publish_core

Content publishing extension to connect stage and production server

40143.4k](/packages/in2code-in2publish-core)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4778.9k](/packages/tiamo-phpas2)[symfony/beanstalkd-messenger

Symfony Beanstalkd Messenger Bridge

19398.9k3](/packages/symfony-beanstalkd-messenger)[wapmorgan/php-rpm-packager

RPM packager for PHP applications.

116.5k](/packages/wapmorgan-php-rpm-packager)

PHPackages © 2026

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