Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+14
-2
@@ -5,10 +5,14 @@
|
||||
|
||||
export const INTEGRATIONS_TOKEN_REFRESH_JOB_ID = "integrations-token-refresh" as const;
|
||||
export const INTEGRATIONS_HEALTH_SWEEP_JOB_ID = "integrations-health-sweep" as const;
|
||||
export const KWP_PROJECT_MAINTENANCE_JOB_ID = "kwp-project-maintenance" as const;
|
||||
|
||||
// Token refresh runs often (tokens expire); health sweep less often.
|
||||
export const INTEGRATIONS_TOKEN_REFRESH_EVERY_MS = 5 * 60 * 1000;
|
||||
// KWP access tokens live for only five minutes. Sweep every minute so the
|
||||
// KWP-specific two-minute refresh window has a real safety margin while the
|
||||
// generic Apps-Engine refresh window remains unchanged.
|
||||
export const INTEGRATIONS_TOKEN_REFRESH_EVERY_MS = 60 * 1000;
|
||||
export const INTEGRATIONS_HEALTH_SWEEP_EVERY_MS = 15 * 60 * 1000;
|
||||
export const KWP_PROJECT_MAINTENANCE_EVERY_MS = 15 * 60 * 1000;
|
||||
|
||||
/** Refresh tokens expiring within this window. Default 10 minutes. */
|
||||
export const INTEGRATIONS_TOKEN_REFRESH_WINDOW_MINUTES = 10;
|
||||
@@ -32,3 +36,11 @@ export async function registerIntegrationsHealthSweepCron(queue: SchedulerQueue)
|
||||
{ name: INTEGRATIONS_HEALTH_SWEEP_JOB_ID, data: { kind: "cleanup.run", task: INTEGRATIONS_HEALTH_SWEEP_JOB_ID } },
|
||||
);
|
||||
}
|
||||
|
||||
export async function registerKwpProjectMaintenanceCron(queue: SchedulerQueue): Promise<void> {
|
||||
await queue.upsertJobScheduler(
|
||||
KWP_PROJECT_MAINTENANCE_JOB_ID,
|
||||
{ every: KWP_PROJECT_MAINTENANCE_EVERY_MS },
|
||||
{ name: KWP_PROJECT_MAINTENANCE_JOB_ID, data: { kind: "cleanup.run", task: KWP_PROJECT_MAINTENANCE_JOB_ID } },
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user