From f97c0b670eb8e490ed2cf5340bd06b4b2a067f87 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 4 Jun 2026 14:07:59 +0100 Subject: [PATCH] Trim verbose queue setup comments Co-Authored-By: Claude Opus 4.8 (1M context) --- app/init/registers.php | 5 +---- app/worker.php | 6 ++---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/init/registers.php b/app/init/registers.php index bdb9f8a643..e7ede8b025 100644 --- a/app/init/registers.php +++ b/app/init/registers.php @@ -363,10 +363,7 @@ $register->set('pools', function () { default => null }; case 'publisher': - // Publishers only issue commands (enqueue/retry/size), never - // the blocking receive, so a single connection backs both the - // receive and commands slots. The pool isolates concurrent - // callers, so no locking is needed here. + // Publishers never block on receive, so one connection backs both broker slots. return match ($dsn->getScheme()) { 'redis' => (function () use ($dsn) { $connection = new Queue\Connection\Redis($dsn->getHost(), $dsn->getPort()); diff --git a/app/worker.php b/app/worker.php index ee1d36d65a..a7a1f7633d 100644 --- a/app/worker.php +++ b/app/worker.php @@ -68,10 +68,8 @@ if (\str_starts_with($workerName, 'databases')) { $redisHost = System::getEnv('_APP_REDIS_HOST', 'redis'); $redisPort = (int) System::getEnv('_APP_REDIS_PORT', 6379); -// The consumer is a single broker, not a pool: one blocking-receive connection -// drives the receive loop while a separate, lock-guarded connection serializes -// acks and publishes issued from the per-message coroutines. Broker\Redis is -// both Publisher and Consumer, so it also backs the queue-depth telemetry gauge. +// A dedicated connection drives the blocking receive loop; a lock-guarded one +// serializes acks/publishes from the per-message coroutines. $adapter = new Swoole( new BrokerRedis( receive: new RedisConnection($redisHost, $redisPort),