Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(updates): continue active threads across server restarts #9167

Mergedmaria-rcksmerged 8 commits intomain fromrefs/pull/9167/headmerged by maria-rcks View on GitHub

Showing 26 changed files with 218 additions and 0 deletions (loading 24).

x
0 of 26 viewed, 26 left
1 addition and 0 deletionsapps/desktop/src/settings/DesktopClientSettings.test.tsModified
View file
@@ -23,6 +23,7 @@
confirmThreadArchive: true,
confirmThreadDelete: false,
confirmThreadUnpin: false,
+ continueThreadsAfterServerUpdate: true,
contextWindowMeterEnabled: false,
dismissedProviderUpdateNotificationKeys: [],
diffIgnoreWhitespace: true,
217 additions and 0 deletionsapps/server/src/cloud/selfUpdate.test.tsModified
View file
@@ -1,6 +1,8 @@
import * as NodeServices from "@effect/platform-node/NodeServices";
import { expect, it } from "@effect/vitest";
+import { ServerSelfUpdateError, ThreadId } from "@t3tools/contracts";
import { HostProcessExecutablePath } from "@t3tools/shared/hostProcess";
+import * as Cause from "effect/Cause";
import * as Deferred from "effect/Deferred";
import * as Effect from "effect/Effect";
import * as FileSystem from "effect/FileSystem";
@@ -104,6 +106,221 @@
});
​
it.layer(NodeServices.layer)("server self update", (it) => {
+ it.effect("marks running threads at the boot-service handoff", () =>
+ Effect.gen(function* () {
+ const events: string[] = [];
+ const selfUpdate = yield* ServerSelfUpdate.withRunningThreadContinuation({
+ mode: "web",