Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.
ReferenceAPI ReferenceLibraryJobsHandlersCleanup Stuck Scheduled Imports Job

web


web / lib/jobs/handlers/cleanup-stuck-scheduled-imports-job

lib/jobs/handlers/cleanup-stuck-scheduled-imports-job

Job handler for cleaning up stuck scheduled imports.

Identifies and resets scheduled imports that have been stuck in “running” status for too long (default 2 hours). This prevents permanent blocking of scheduled imports due to job failures or system crashes.

Interfaces

CleanupStuckScheduledImportsJobInput

Properties

stuckThresholdHours?

optional stuckThresholdHours: number

Hours after which a running import is considered stuck (default: 2)

dryRun?

optional dryRun: boolean

Whether to run in dry-run mode (default: false)

Variables

cleanupStuckScheduledImportsJob

const cleanupStuckScheduledImportsJob: object

Type declaration

slug

slug: string = "cleanup-stuck-scheduled-imports"

handler()

handler: (context) => Promise<{ output: { success: boolean; totalRunning: number; stuckCount: number; resetCount: number; dryRun: boolean; errors: undefined | object[]; }; }>

Parameters
context

JobHandlerContext

Returns

Promise<{ output: { success: boolean; totalRunning: number; stuckCount: number; resetCount: number; dryRun: boolean; errors: undefined | object[]; }; }>

Last updated on