Skip to content
Français

createSqliteTaskQueue

import { createSqliteTaskQueue } from "@elie-laloum/outpost";

Open or create a SQLite queue database at path, with its parent directory, and return a DurableTaskQueue. Jobs are claimed in insertion order under fenced leases and every write is synced to disk. Call close() once workers and producers have stopped.

Complete example and detailed rules.

  • pathRequired
    string
    Path of the SQLite database file, resolved from the current directory; the file and its parent directory are created when missing.

Promise<DurableTaskQueue>

export declare function createSqliteTaskQueue(
  path: string,
): Promise<DurableTaskQueue>;