Repository navigation
Subscribe to engine events on the engine's Redis client - #179
Merged
dbaseqp merged 2 commits intoNov 7, 2026
Merged
Conversation
tire-fire
force-pushed
the
refactor/consolidate-redis-clients
branch
from
November 7, 2026 05:06
7922a4b to
0e63829
Compare
tire-fire
force-pushed
the
refactor/consolidate-redis-clients
branch
from
November 7, 2026 05:14
0e63829 to
954072e
Compare
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.
Summary
Start(),waitForReset()andrvb()each built their own Redis client fromREDIS_ADDR(falling back toquotient_redis:6379) just to subscribe to theeventschannel, andrvb()did so every round. They now subscribe throughse.RedisClient, the client the engine already uses to publish those events and to move tasks and results.waitForResetbecomes a method so it can reach it.This also fixes the engine tests. They publish to the test Redis (
REDIS_HOST/REDIS_PORT, port 6380 in CI), butrvb()subscribed whereverREDIS_ADDRpointed, and two tests set that tolocalhost:6379. So in tests the engine never saw events published during a round. Those twot.Setenv("REDIS_ADDR", ...)calls are removed, since nothing reads it on that path anymore.The runner still reads
REDIS_ADDRfor its own connection; that's unchanged.Tests
TestRvb_StopsOnResetPublishedToEngineRedispublishesreseton the engine's Redis client during result collection and expectsrvb()to stop with "reset event received". It fails against the currentengine.go(rvb()returns nil after the round times out) and passes with this change.go vetandgolangci-lintpass.