mirror of
https://github.com/stablyai/orca.git
synced 2026-11-03 02:27:43 +00:00
* refactor(cloud): share PostgreSQL schema startup between services * feat(cloud): add durable native push notification gateway * infra(push): define dedicated gateway resources and operational checks * fix(push): bound cross-host admission and simplify gateway configuration * fix(push): validate deploy configuration and preserve topic-error registrations
10 lines
322 B
TypeScript
10 lines
322 B
TypeScript
export function providerRetryAfter(
|
|
value: string | undefined,
|
|
now = Date.now()
|
|
): number | undefined {
|
|
if (!value) return undefined
|
|
const seconds = Number(value)
|
|
const delay = Number.isFinite(seconds) ? seconds * 1000 : Date.parse(value) - now
|
|
return Number.isFinite(delay) ? Math.max(0, delay) : undefined
|
|
}
|