Libraries v5.0.0
    Preparing search index...

    Durable PostgreSQL repository with database-time leases and SKIP LOCKED claims.

    Hierarchy (View Summary)

    Index
    storage: JobStorage
    • Read attempt audit history, scoped through the owning run.

      Parameters

      • namespace: string
      • id: string

      Returns Promise<JobAttempt[]>

    • Fence a running owner immediately; physical cancellation is cooperative.

      Parameters

      • namespace: string
      • id: string

      Returns Promise<boolean>

    • Atomically acquire one run. Expired attempts are recorded before any retry.

      Parameters

      • namespace: string
      • supported: readonly SupportedJob[]
      • leaseMs: number

      Returns Promise<RunRecord | undefined>

    • Purge terminal data only; deduplication ends when the retained run is removed.

      Parameters

      • namespace: string
      • Optionallimit: number

      Returns Promise<number>

    • Publish output and terminal event atomically, rejecting stale owners.

      Parameters

      • namespace: string
      • id: string
      • token: string
      • output: JsonValue

      Returns Promise<void>

    • Atomically materialize due occurrences and advance locked schedule cursors.

      Parameters

      • namespace: string
      • OptionalscheduleLimit: number
      • OptionalreplayLimit: number

      Returns Promise<number>

    • Read a bounded page of committed events, scoped through the owning run.

      Parameters

      • namespace: string
      • id: string
      • after: number
      • Optionallimit: number

      Returns Promise<JobEvent[]>

    • Persist a failure or shutdown interruption and its retry decision.

      Parameters

      • namespace: string
      • id: string
      • token: string
      • error: JobError
      • Optionalretryable: boolean
      • Optionalinterrupted: boolean

      Returns Promise<void>

    • Read a detached internal record. Applications should use JobScheduler.getRun.

      Parameters

      • namespace: string
      • id: string

      Returns Promise<RunRecord | undefined>

    • Renew an unexpired lease; a late heartbeat cannot resurrect ownership.

      Parameters

      • namespace: string
      • id: string
      • token: string
      • leaseMs: number

      Returns Promise<void>

    • Pausing stops new occurrences, not already accepted runs.

      Parameters

      • namespace: string
      • id: string
      • Optionalpaused: boolean

      Returns Promise<boolean>

    • Tombstone a trigger while preserving identity/revision history.

      Parameters

      • namespace: string
      • id: string

      Returns Promise<boolean>

    • Commit ordered progress within the ownership transaction.

      Parameters

      • namespace: string
      • id: string
      • token: string
      • progress: JsonValue

      Returns Promise<void>