Download the PHP package glueful/queue-ops without Composer
On this page you can find all versions of the php package glueful/queue-ops. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download glueful/queue-ops
More information about glueful/queue-ops
Files in glueful/queue-ops
Package queue-ops
Short Description Queue operations for Glueful (worker supervision, autoscaling, worker/job metrics).
License MIT
Homepage https://github.com/glueful/queue-ops
Informations about the package queue-ops
Queue Ops Extension for Glueful
Overview
Queue Ops restores production-grade queue operations on top of the framework's
lean queue runtime: supervised multi-worker fleets, intelligent autoscaling, and
persisted worker/job metrics. The framework core ships a single-worker
queue:work; this extension adds the supervisor and autoscaler around it.
It plugs into the framework through the
Glueful\Queue\Contracts\WorkerMonitorInterface seam: the core binds a no-op
NullWorkerMonitor by default, and this extension overrides it (last-provider-wins)
with a persistence-backed WorkerMonitor that records worker lifecycle and job
metrics into the queue_workers and queue_job_metrics tables. It then registers
the process-supervision tree (ProcessManager, AutoScaler, ScheduledScaler,
ResourceMonitor, StreamingMonitor) and the queue:supervise / queue:autoscale
commands. Core's queue:work keeps running unchanged whether or not this extension
is installed.
Features
queue:supervise: multi-worker supervision via Symfony Process — spawn, scale, stop, restart, status (with live watch), health checks, plus the leaf-worker IPC loop that spawned workers runqueue:autoscale: resource-aware autoscaling daemon with load-based scaling, cron-scheduled scaling, resource monitoring, and real-time streaming- Worker & job metrics persistence: lifecycle, heartbeats, and per-job metrics recorded to
queue_workers/queue_job_metrics - Resource-aware scaling: CPU / memory / disk / load thresholds gate scale-up decisions to prevent resource exhaustion
- Scheduled scaling: cron-like schedules for predictable load windows (
dragonmantank/cron-expression) - Seam-based: binds the core
WorkerMonitorInterface, overriding the no-op default; the framework's leanqueue:workis unaffected
Installation
Installation (Recommended)
Install via Composer
Composer discovers packages of type glueful-extension, but installing does not auto-enable them — the provider must be added to config/extensions.php's enabled allow-list. The CLI does that for you:
In production, manage the enabled list in config and run php glueful extensions:cache in your deploy step.
This extension ships migrations (queue_workers, queue_job_metrics). Run them after enabling:
Local Development Installation
To develop the extension locally, register it as a Composer path repository in your app's composer.json, then require and enable it:
Entries in config/extensions.php are plain string FQCNs (no ::class) — prefer extensions:enable over editing by hand.
Verify Installation
Post-install checklist:
- Run migrations (if not auto-run):
php glueful migrate:run - Rebuild cache after Composer operations:
php glueful extensions:cache - Confirm the seam is bound: resolving
Glueful\Queue\Contracts\WorkerMonitorInterfaceyieldsGlueful\Extensions\QueueOps\Monitoring\WorkerMonitor
Configuration
Configuration is loaded from the extension's config/queue_ops.php and merged under
the queue_ops key by the service provider. The keys below moved out of core
config/queue.php (the queue.workers.* tree) when the ops surface became this
extension; the feeding env vars are unchanged.
The config exposes these blocks: process, auto_scaling, queues (per-queue
workers / max_workers / auto_scale), resource_limits, resource_thresholds,
and supervisor. Per-queue worker counts are set with env vars such as
CRITICAL_QUEUE_WORKERS / CRITICAL_QUEUE_MAX_WORKERS / CRITICAL_QUEUE_AUTO_SCALE
(and the equivalent DEFAULT_*, HIGH_*, EMAIL_*, REPORTS_*,
NOTIFICATIONS_*, MAINTENANCE_* sets).
The per-queue kept keys — priority / memory_limit / timeout / max_jobs —
remain in core config/queue.workers.queues.<name> and are read by the core worker;
this extension merges them with its own per-queue keys at runtime.
Usage
Core keeps a lean single-worker runner regardless of this extension:
Supervise a worker fleet — queue:supervise
The process action is the leaf-worker IPC loop spawned workers run; it emits
[HEARTBEAT] / [JOB_COMPLETED] / [METRICS] lines the supervisor parses
(use --with-monitoring / --emit-heartbeat).
Autoscale — queue:autoscale
Requirements
- PHP 8.3 or higher
- Glueful 1.52.0 or higher
ext-pcntlrecommended (graceful signal handling for daemons/leaf workers)symfony/processanddragonmantank/cron-expression(provided by the framework)
License
MIT — licensed consistently with the Glueful framework.
Support
For issues, feature requests, or questions, please create an issue in the repository.