fix: auto upgrade toast message (#4625)

Co-authored-by: Dax Raad <d@ironbay.co>
Co-authored-by: opencode <opencode@sst.dev>
This commit is contained in:
Ravi Kumar
2025-11-23 03:56:46 +05:30
committed by GitHub
parent 1b692ec7eb
commit b92e8510f9
6 changed files with 45 additions and 4 deletions

View File

@@ -26,8 +26,6 @@ process.on("uncaughtException", (e) => {
})
})
upgrade()
let server: Bun.Server<undefined>
export const rpc = {
async server(input: { port: number; hostname: string }) {
@@ -42,6 +40,14 @@ export const rpc = {
throw e
}
},
async checkUpgrade(input: { directory: string }) {
await Instance.provide({
directory: input.directory,
fn: async () => {
await upgrade().catch(() => {})
},
})
},
async shutdown() {
Log.Default.info("worker shutting down")
await Instance.disposeAll()