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

Function buildCleanupRunner

apps/sim/lib/billing/cleanup-dispatcher.ts:188–200  ·  view source on GitHub ↗
(jobType: CleanupJobType)

Source from the content-addressed store, hash-verified

186}
187
188async function buildCleanupRunner(jobType: CleanupJobType): Promise<EnqueueOptions['runner']> {
189 const cleanupRunner = await (async () => {
190 switch (jobType) {
191 case 'cleanup-logs':
192 return (await import('@/background/cleanup-logs')).runCleanupLogs
193 case 'cleanup-soft-deletes':
194 return (await import('@/background/cleanup-soft-deletes')).runCleanupSoftDeletes
195 case 'cleanup-tasks':
196 return (await import('@/background/cleanup-tasks')).runCleanupTasks
197 }
198 })()
199 return ((payload) => cleanupRunner(payload as CleanupJobPayload)) as EnqueueOptions['runner']
200}
201
202/** Job type → plan whose housekeeping is global, not per-workspace. */
203const GLOBAL_HOUSEKEEPING_PLAN: Partial<Record<CleanupJobType, PlanCategory>> = {

Callers 1

dispatchCleanupJobsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected