Repository navigation
feat(platform): let a worker spec ask for a batch - #301
Merged
Merged
Conversation
Server::job() has taken a batch size since queue 3.0, but every worker boots through initWorker(), which called job() with two arguments -- so the parameter was unreachable from an application and no queue could ask for more than one message per receive. The constraint moves with it: queue 3.0 adds two methods to Connection, which platform neither implements nor calls, so nothing here changes for the major.
levivannoort
requested review from
lohanidamodar and
shimonewman
as code owners
September 18, 2026 12:51
loks0n
approved these changes
Sep 18, 2026
pull Bot
pushed a commit
to Zezo-Ai/ZezoAi-appwrite
that referenced
this pull request
Sep 18, 2026
The major adds rightPopMany() and incrementBy() to Connection, which is the whole of its breaking surface here: InMemoryConnection is the only implementation in this repository, and WorkerConcurrencyTest drives it. Consumer is unchanged, so FakeConsumer in InitJobsTest needs nothing. 3.0 brings PermanentFailure (a handler can end a message's life rather than spend its whole redelivery budget on work that cannot succeed), a pluggable envelope codec, and batched receive -- none of which this commit takes up. It moves the floor so applications built on server-ce can. The lock is not updated yet: utopia-php/platform 1.0.0-rc20 caps queue at ^2.0.0, so this needs rc21 (utopia-php/monorepo#301) first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Server::job()has taken a batch size since queue 3.0.0, but every worker boots throughPlatform::initWorker(), which calledjob()with two arguments. The parameter was unreachable from an application, so no queue could claim more than one message per receive no matter what it configured.jobsentries now carry an optionalbatchalongsidequeueandmaxCoroutines, defaulting to 1 — the behaviour every caller has today.The constraint moves in the same commit: queue 3.0.0 adds
rightPopMany()andincrementBy()toConnection, which platform neither implements nor calls. It usesAdapter\\SwooleandServer, both unchanged across the major, so^3.0.0joins the existing list rather than replacing it.Needed by appwrite/appwrite, which pins platform exactly and cannot take queue 3.0.0 until this releases as
1.0.0-rc21.