Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): skip disabled settlement lookups #10424

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/10424/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 72 additions and 7 deletions.

x
0 of 2 viewed, 2 left
68 additions and 7 deletionsapps/server/src/orchestration/ThreadSettlementReactor.test.tsModified
View file
@@ -167,6 +167,7 @@
const snapshotReadCount = yield* Ref.make(0);
const snapshotReads = yield* Queue.unbounded<number>();
const settings = yield* Ref.make(options.settings ?? DEFAULT_SERVER_SETTINGS);
+ const settingsReads = yield* Queue.unbounded<ServerSettings>();
const settingsChanges = yield* PubSub.unbounded<ServerSettings>();
const mergedPullRequests = yield* PubSub.unbounded<PullRequestMergeEvent>();
const commands = yield* Ref.make<ReadonlyArray<AutoSettleCommand>>([]);
@@ -226,7 +227,7 @@
const serverSettings = ServerSettingsService.of({
start: Effect.void,
ready: Effect.void,
- getSettings: Ref.get(settings),
+ getSettings: Ref.get(settings).pipe(Effect.tap((value) => Queue.offer(settingsReads, value))),
updateSettings,
streamChanges: Stream.fromPubSub(settingsChanges),
subscribeChanges: PubSub.subscribe(settingsChanges).pipe(
@@ -271,6 +272,7 @@
snapshots,
snapshotReadCount,
snapshotReads,
+ settingsReads,
commands,
branchCalls,
summaryCalls,
@@ -376,6 +378,62 @@