Skip to main content

getGlobalCleanupStatistics

API Docs


Function: getGlobalCleanupStatistics()

getGlobalCleanupStatistics(drizzleClient): Promise<{ averageInstancesPerOrganization: number; newestInstanceDate: Date | null; oldestInstanceDate: Date | null; totalInstances: number; totalInstancesEligibleForCleanup: number; totalOrganizations: number; }>

Defined in: src/workers/eventCleanupWorker.ts:332

Retrieves global statistics about the cleanup process across all organizations, including total instance counts and eligibility for cleanup.

Parameters

drizzleClient

NodePgDatabase<API Docs>

Returns

Promise<{ averageInstancesPerOrganization: number; newestInstanceDate: Date | null; oldestInstanceDate: Date | null; totalInstances: number; totalInstancesEligibleForCleanup: number; totalOrganizations: number; }>

A promise that resolves to an object with the global cleanup statistics.