MCPcopy Index your code
hub / github.com/simstudioai/sim / cleanupFreePlanOrphanedSnapshots

Function cleanupFreePlanOrphanedSnapshots

apps/sim/background/cleanup-logs.ts:415–423  ·  view source on GitHub ↗
(retentionHours: number)

Source from the content-addressed store, hash-verified

413}
414
415async function cleanupFreePlanOrphanedSnapshots(retentionHours: number): Promise<void> {
416 try {
417 const retentionDays = Math.floor(retentionHours / 24)
418 const snapshotsCleaned = await snapshotService.cleanupOrphanedSnapshots(retentionDays + 1)
419 logger.info(`Cleaned up ${snapshotsCleaned} orphaned snapshots`)
420 } catch (snapshotError) {
421 logger.error('Error cleaning up orphaned snapshots:', { snapshotError })
422 }
423}
424
425export async function runCleanupLogs(payload: CleanupJobPayload): Promise<void> {
426 const startTime = Date.now()

Callers 1

runCleanupLogsFunction · 0.85

Calls 3

infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected