feat: update session management functions and improve partition handling
Desktop Client Build / Resolve Build Metadata (push) Successful in 31s
Frontend CI / Frontend (push) Successful in 2m58s
Backend CI / Backend (push) Successful in 18m2s
Desktop Client Build / Build Desktop Client (push) Successful in 24m49s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 38s
Desktop Client Build / Resolve Build Metadata (push) Successful in 31s
Frontend CI / Frontend (push) Successful in 2m58s
Backend CI / Backend (push) Successful in 18m2s
Desktop Client Build / Build Desktop Client (push) Successful in 24m49s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 38s
This commit is contained in:
@@ -19,7 +19,7 @@ import {
|
||||
type PlatformFailureInput,
|
||||
} from './platform-auth-adapters'
|
||||
import { emitRuntimeInvalidated } from './runtime-events'
|
||||
import { getPersistedPartition, getSessionHandle } from './session-registry'
|
||||
import { createSessionHandleForPartition, resolveStoredSessionPartition } from './session-registry'
|
||||
|
||||
const PROBE_TICK_MS = 1_000
|
||||
const STALE_AFTER_MS = 45 * 60_000
|
||||
@@ -117,15 +117,16 @@ function persistedHealthPath(): string {
|
||||
}
|
||||
|
||||
function resolvePartition(accountId: string): string {
|
||||
return (
|
||||
getSessionHandle(accountId)?.partition ??
|
||||
getPersistedPartition(accountId) ??
|
||||
`persist:acc-${accountId}`
|
||||
)
|
||||
return resolveStoredSessionPartition(accountId) ?? `persist:acc-${accountId}`
|
||||
}
|
||||
|
||||
function resolveKnownPartition(accountId: string): string | null {
|
||||
return getSessionHandle(accountId)?.partition ?? getPersistedPartition(accountId) ?? null
|
||||
const partition = resolveStoredSessionPartition(accountId)
|
||||
if (!partition) {
|
||||
return null
|
||||
}
|
||||
createSessionHandleForPartition(accountId, partition)
|
||||
return partition
|
||||
}
|
||||
|
||||
function nextInitialProbeAt(now = Date.now()): number {
|
||||
|
||||
Reference in New Issue
Block a user