mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Trim verbose queue setup comments
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
18a6e07691
commit
f97c0b670e
2 files changed
+3
-8
No files matched your search
@@ -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());
|
||||
|
||||
+2
-4
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user