Skip to main content

cleanupSpecificOrganization

API Docs


Function: cleanupSpecificOrganization()

cleanupSpecificOrganization(organizationId, drizzleClient, logger): Promise<{ instancesDeleted: number; retentionCutoffDate: Date; }>

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

Manually triggers a cleanup of old instances for a specific organization.

Parameters

organizationId

string

The ID of the organization to clean up.

drizzleClient

NodePgDatabase<API Docs>

logger

FastifyBaseLogger

Returns

Promise<{ instancesDeleted: number; retentionCutoffDate: Date; }>

A promise that resolves to an object containing the number of deleted instances and the retention cutoff date used.