@sidequest/core
Version:
@sidequest/core is the core package of SideQuest, a distributed background job queue for Node.js and TypeScript applications.
34 lines (32 loc) • 789 B
TypeScript
/**
* Represents the possible states of a queue.
* - "active": The queue is currently processing items.
* - "paused": The queue has been paused and is not processing items.
*/
type QueueState = "active" | "paused";
/**
* Configuration options for a queue instance.
*/
interface QueueConfig {
/**
* Unique identifier for the queue.
*/
id: number;
/**
* Human-readable name for the queue.
*/
name: string;
/**
* Maximum number of concurrent jobs the queue can process.
*/
concurrency: number;
/**
* Current operational state of the queue.
*/
state: QueueState;
/**
* Priority value used to determine the queue's processing order.
*/
priority: number;
}
export type { QueueConfig, QueueState };