SQLite Task Queue Adapter for the @quatrain/queue namespace.
This package provides a robust local-first persistent queue adapter using SQLite. It is designed to queue tasks locally in memory or write them persistently on disk, processing them sequentially or concurrently under unprivileged user execution constraints.
:memory: or persistent file).BEGIN IMMEDIATE statements to prevent multi-process locking conflicts.AbstractQueueAdapter specification.yarn add @quatrain/queue-sqlite
Initialize the adapter with a path to your SQLite database file:
import { Queue } from '@quatrain/queue';
import { SQLiteQueueAdapter } from '@quatrain/queue-sqlite';
const queueDbPath = './data/queue.sqlite';
Queue.addQueue(new SQLiteQueueAdapter({
config: { database: queueDbPath }
}), 'default', true);