@igniter-js/jobs 0.1.12 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/AGENTS.md +117 -243
  2. package/README.md +311 -153
  3. package/dist/{adapter-CXZxomI9.d.mts → adapter-Cax_40HW.d.mts} +27 -6
  4. package/dist/{adapter-CXZxomI9.d.ts → adapter-Cax_40HW.d.ts} +27 -6
  5. package/dist/adapters/bun.d.mts +93 -0
  6. package/dist/adapters/bun.d.ts +93 -0
  7. package/dist/adapters/bun.js +914 -0
  8. package/dist/adapters/bun.js.map +1 -0
  9. package/dist/adapters/bun.mjs +912 -0
  10. package/dist/adapters/bun.mjs.map +1 -0
  11. package/dist/adapters/{memory.adapter.d.ts → mock.d.mts} +1 -3
  12. package/dist/adapters/{memory.adapter.d.mts → mock.d.ts} +1 -3
  13. package/dist/adapters/{memory.adapter.js → mock.js} +58 -25
  14. package/dist/adapters/mock.js.map +1 -0
  15. package/dist/adapters/{memory.adapter.mjs → mock.mjs} +58 -25
  16. package/dist/adapters/mock.mjs.map +1 -0
  17. package/dist/adapters/{bullmq.adapter.d.ts → node.d.mts} +1 -3
  18. package/dist/adapters/{bullmq.adapter.d.mts → node.d.ts} +1 -3
  19. package/dist/adapters/{bullmq.adapter.js → node.js} +117 -40
  20. package/dist/adapters/node.js.map +1 -0
  21. package/dist/adapters/{bullmq.adapter.mjs → node.mjs} +117 -40
  22. package/dist/adapters/node.mjs.map +1 -0
  23. package/dist/index.d.mts +17 -21
  24. package/dist/index.d.ts +17 -21
  25. package/dist/index.js +20 -1854
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +21 -1852
  28. package/dist/index.mjs.map +1 -1
  29. package/package.json +28 -40
  30. package/CHANGELOG.md +0 -13
  31. package/dist/adapters/bullmq.adapter.js.map +0 -1
  32. package/dist/adapters/bullmq.adapter.mjs.map +0 -1
  33. package/dist/adapters/index.d.mts +0 -143
  34. package/dist/adapters/index.d.ts +0 -143
  35. package/dist/adapters/index.js +0 -1891
  36. package/dist/adapters/index.js.map +0 -1
  37. package/dist/adapters/index.mjs +0 -1887
  38. package/dist/adapters/index.mjs.map +0 -1
  39. package/dist/adapters/memory.adapter.js.map +0 -1
  40. package/dist/adapters/memory.adapter.mjs.map +0 -1
@@ -167,6 +167,10 @@ interface IgniterJobsExecutionContext<TContext, TInput extends IgniterJobsSchema
167
167
  */
168
168
  createdAt?: Date;
169
169
  metadata?: Record<string, unknown>;
170
+ /**
171
+ * Reports job progress and triggers the public progress hook when supported by the adapter.
172
+ */
173
+ updateProgress?: (progress: number, message?: string) => Promise<void>;
170
174
  };
171
175
  scope?: IgniterJobsScopeEntry;
172
176
  }
@@ -235,12 +239,12 @@ interface IgniterCronDefinition<TContext, TResult = unknown> {
235
239
  startDate?: Date;
236
240
  /** Optional end date for the schedule (adapter-dependent). */
237
241
  endDate?: Date;
238
- handler: (context: Omit<IgniterJobsExecutionContext<TContext, unknown>, 'input'>) => Promise<TResult> | TResult;
242
+ handler: (context: Omit<IgniterJobsExecutionContext<TContext, unknown>, "input">) => Promise<TResult> | TResult;
239
243
  }
240
244
  /**
241
245
  * Supported job states for management queries.
242
246
  */
243
- type IgniterJobStatus = 'waiting' | 'active' | 'completed' | 'failed' | 'delayed' | 'paused';
247
+ type IgniterJobStatus = "waiting" | "active" | "completed" | "failed" | "delayed" | "paused";
244
248
  /**
245
249
  * Result shape for job inspection calls.
246
250
  */
@@ -475,7 +479,7 @@ type IgniterJobsAdapterScheduleParams = {
475
479
  interface IgniterJobsJobLog {
476
480
  timestamp: Date;
477
481
  message: string;
478
- level: 'info' | 'warn' | 'error';
482
+ level: "info" | "warn" | "error";
479
483
  }
480
484
  /**
481
485
  * Adapter contract for jobs backends.
@@ -506,8 +510,6 @@ interface IgniterJobsAdapter {
506
510
  force?: boolean;
507
511
  }): Promise<void>;
508
512
  retryAllInQueue(queue: string): Promise<number>;
509
- pauseJobType(queue: string, jobName: string): Promise<void>;
510
- resumeJobType(queue: string, jobName: string): Promise<void>;
511
513
  searchJobs(filter: Record<string, unknown>): Promise<IgniterJobSearchResult[]>;
512
514
  searchQueues(filter: Record<string, unknown>): Promise<IgniterJobsQueueInfo[]>;
513
515
  searchWorkers(filter: Record<string, unknown>): Promise<IgniterJobsWorkerHandle[]>;
@@ -525,5 +527,24 @@ interface IgniterJobsAdapter {
525
527
  interface IgniterJobsBullMQAdapterOptions {
526
528
  redis: Redis;
527
529
  }
530
+ /**
531
+ * Configuration for the Bun SQLite adapter.
532
+ */
533
+ interface IgniterJobsBunSQLiteAdapterOptions {
534
+ /** SQLite file path used by the embedded runtime. */
535
+ path: string;
536
+ /** Forces immediate persistence for dispatched jobs. @default false */
537
+ durable?: boolean;
538
+ /** Worker heartbeat interval in milliseconds. @default 10000 */
539
+ heartbeatInterval?: number;
540
+ /** Long-poll timeout while the queue is empty. @default 0 */
541
+ pollTimeout?: number;
542
+ /** Number of jobs pulled per worker batch. @default 10 */
543
+ batchSize?: number;
544
+ /** Lock duration for active jobs in milliseconds. @default 30000 */
545
+ lockDuration?: number;
546
+ /** Maximum stalled detections before a job fails. @default 1 */
547
+ maxStalledCount?: number;
548
+ }
528
549
 
529
- export type { IgniterJobsEvent as A, IgniterJobsExecutionContext as B, IgniterJobsFailureHook as C, IgniterJobsHookContext as D, IgniterJobsInferSchemaOutput as E, IgniterJobsInvokeOptions as F, IgniterJobsProgressHook as G, IgniterJobsScheduleOptions as H, IgniterJobsAdapter as I, IgniterJobsStartHook as J, IgniterJobsSuccessHook as K, IgniterJobsWorkerMetrics as L, IgniterJobsQueueManager as a, IgniterJobsBullMQAdapterOptions as b, IgniterJobDefinition as c, IgniterCronDefinition as d, IgniterJobsAdapterDispatchParams as e, IgniterJobsAdapterScheduleParams as f, IgniterJobSearchResult as g, IgniterJobStatus as h, IgniterJobsJobLog as i, IgniterJobsQueueInfo as j, IgniterJobsQueueCleanOptions as k, IgniterJobsWorkerHandle as l, IgniterJobsWorkerBuilderConfig as m, IgniterJobsEventHandler as n, IgniterJobCounts as o, IgniterJobsQueue as p, IgniterJobsScopeDefinition as q, IgniterJobsTelemetry as r, IgniterJobsLimiter as s, IgniterJobsWorkerHandlers as t, IgniterJobsDispatchParams as u, IgniterJobsScheduleParams as v, IgniterJobsInferSchemaInput as w, IgniterJobsScopeEntry as x, IgniterJobsSchema as y, IgniterJobsScopeOptions as z };
550
+ export type { IgniterJobsExecutionContext as A, IgniterJobsFailureHook as B, IgniterJobsHookContext as C, IgniterJobsInferSchemaOutput as D, IgniterJobsInvokeOptions as E, IgniterJobsJobLog as F, IgniterJobsProgressHook as G, IgniterJobsQueueManager as H, IgniterJobsQueue as I, IgniterJobsScheduleOptions as J, IgniterJobsStartHook as K, IgniterJobsSuccessHook as L, IgniterJobsWorkerMetrics as M, IgniterJobsAdapter as a, IgniterJobsScopeDefinition as b, IgniterJobDefinition as c, IgniterJobsWorkerBuilderConfig as d, IgniterJobsTelemetry as e, IgniterJobsEventHandler as f, IgniterJobSearchResult as g, IgniterJobsQueueInfo as h, IgniterJobsWorkerHandle as i, IgniterJobsLimiter as j, IgniterJobsWorkerHandlers as k, IgniterJobsQueueCleanOptions as l, IgniterJobStatus as m, IgniterJobsDispatchParams as n, IgniterJobsScheduleParams as o, IgniterJobsInferSchemaInput as p, IgniterCronDefinition as q, IgniterJobsScopeEntry as r, IgniterJobsSchema as s, IgniterJobsScopeOptions as t, IgniterJobCounts as u, IgniterJobsAdapterDispatchParams as v, IgniterJobsAdapterScheduleParams as w, IgniterJobsBullMQAdapterOptions as x, IgniterJobsBunSQLiteAdapterOptions as y, IgniterJobsEvent as z };
@@ -167,6 +167,10 @@ interface IgniterJobsExecutionContext<TContext, TInput extends IgniterJobsSchema
167
167
  */
168
168
  createdAt?: Date;
169
169
  metadata?: Record<string, unknown>;
170
+ /**
171
+ * Reports job progress and triggers the public progress hook when supported by the adapter.
172
+ */
173
+ updateProgress?: (progress: number, message?: string) => Promise<void>;
170
174
  };
171
175
  scope?: IgniterJobsScopeEntry;
172
176
  }
@@ -235,12 +239,12 @@ interface IgniterCronDefinition<TContext, TResult = unknown> {
235
239
  startDate?: Date;
236
240
  /** Optional end date for the schedule (adapter-dependent). */
237
241
  endDate?: Date;
238
- handler: (context: Omit<IgniterJobsExecutionContext<TContext, unknown>, 'input'>) => Promise<TResult> | TResult;
242
+ handler: (context: Omit<IgniterJobsExecutionContext<TContext, unknown>, "input">) => Promise<TResult> | TResult;
239
243
  }
240
244
  /**
241
245
  * Supported job states for management queries.
242
246
  */
243
- type IgniterJobStatus = 'waiting' | 'active' | 'completed' | 'failed' | 'delayed' | 'paused';
247
+ type IgniterJobStatus = "waiting" | "active" | "completed" | "failed" | "delayed" | "paused";
244
248
  /**
245
249
  * Result shape for job inspection calls.
246
250
  */
@@ -475,7 +479,7 @@ type IgniterJobsAdapterScheduleParams = {
475
479
  interface IgniterJobsJobLog {
476
480
  timestamp: Date;
477
481
  message: string;
478
- level: 'info' | 'warn' | 'error';
482
+ level: "info" | "warn" | "error";
479
483
  }
480
484
  /**
481
485
  * Adapter contract for jobs backends.
@@ -506,8 +510,6 @@ interface IgniterJobsAdapter {
506
510
  force?: boolean;
507
511
  }): Promise<void>;
508
512
  retryAllInQueue(queue: string): Promise<number>;
509
- pauseJobType(queue: string, jobName: string): Promise<void>;
510
- resumeJobType(queue: string, jobName: string): Promise<void>;
511
513
  searchJobs(filter: Record<string, unknown>): Promise<IgniterJobSearchResult[]>;
512
514
  searchQueues(filter: Record<string, unknown>): Promise<IgniterJobsQueueInfo[]>;
513
515
  searchWorkers(filter: Record<string, unknown>): Promise<IgniterJobsWorkerHandle[]>;
@@ -525,5 +527,24 @@ interface IgniterJobsAdapter {
525
527
  interface IgniterJobsBullMQAdapterOptions {
526
528
  redis: Redis;
527
529
  }
530
+ /**
531
+ * Configuration for the Bun SQLite adapter.
532
+ */
533
+ interface IgniterJobsBunSQLiteAdapterOptions {
534
+ /** SQLite file path used by the embedded runtime. */
535
+ path: string;
536
+ /** Forces immediate persistence for dispatched jobs. @default false */
537
+ durable?: boolean;
538
+ /** Worker heartbeat interval in milliseconds. @default 10000 */
539
+ heartbeatInterval?: number;
540
+ /** Long-poll timeout while the queue is empty. @default 0 */
541
+ pollTimeout?: number;
542
+ /** Number of jobs pulled per worker batch. @default 10 */
543
+ batchSize?: number;
544
+ /** Lock duration for active jobs in milliseconds. @default 30000 */
545
+ lockDuration?: number;
546
+ /** Maximum stalled detections before a job fails. @default 1 */
547
+ maxStalledCount?: number;
548
+ }
528
549
 
529
- export type { IgniterJobsEvent as A, IgniterJobsExecutionContext as B, IgniterJobsFailureHook as C, IgniterJobsHookContext as D, IgniterJobsInferSchemaOutput as E, IgniterJobsInvokeOptions as F, IgniterJobsProgressHook as G, IgniterJobsScheduleOptions as H, IgniterJobsAdapter as I, IgniterJobsStartHook as J, IgniterJobsSuccessHook as K, IgniterJobsWorkerMetrics as L, IgniterJobsQueueManager as a, IgniterJobsBullMQAdapterOptions as b, IgniterJobDefinition as c, IgniterCronDefinition as d, IgniterJobsAdapterDispatchParams as e, IgniterJobsAdapterScheduleParams as f, IgniterJobSearchResult as g, IgniterJobStatus as h, IgniterJobsJobLog as i, IgniterJobsQueueInfo as j, IgniterJobsQueueCleanOptions as k, IgniterJobsWorkerHandle as l, IgniterJobsWorkerBuilderConfig as m, IgniterJobsEventHandler as n, IgniterJobCounts as o, IgniterJobsQueue as p, IgniterJobsScopeDefinition as q, IgniterJobsTelemetry as r, IgniterJobsLimiter as s, IgniterJobsWorkerHandlers as t, IgniterJobsDispatchParams as u, IgniterJobsScheduleParams as v, IgniterJobsInferSchemaInput as w, IgniterJobsScopeEntry as x, IgniterJobsSchema as y, IgniterJobsScopeOptions as z };
550
+ export type { IgniterJobsExecutionContext as A, IgniterJobsFailureHook as B, IgniterJobsHookContext as C, IgniterJobsInferSchemaOutput as D, IgniterJobsInvokeOptions as E, IgniterJobsJobLog as F, IgniterJobsProgressHook as G, IgniterJobsQueueManager as H, IgniterJobsQueue as I, IgniterJobsScheduleOptions as J, IgniterJobsStartHook as K, IgniterJobsSuccessHook as L, IgniterJobsWorkerMetrics as M, IgniterJobsAdapter as a, IgniterJobsScopeDefinition as b, IgniterJobDefinition as c, IgniterJobsWorkerBuilderConfig as d, IgniterJobsTelemetry as e, IgniterJobsEventHandler as f, IgniterJobSearchResult as g, IgniterJobsQueueInfo as h, IgniterJobsWorkerHandle as i, IgniterJobsLimiter as j, IgniterJobsWorkerHandlers as k, IgniterJobsQueueCleanOptions as l, IgniterJobStatus as m, IgniterJobsDispatchParams as n, IgniterJobsScheduleParams as o, IgniterJobsInferSchemaInput as p, IgniterCronDefinition as q, IgniterJobsScopeEntry as r, IgniterJobsSchema as s, IgniterJobsScopeOptions as t, IgniterJobCounts as u, IgniterJobsAdapterDispatchParams as v, IgniterJobsAdapterScheduleParams as w, IgniterJobsBullMQAdapterOptions as x, IgniterJobsBunSQLiteAdapterOptions as y, IgniterJobsEvent as z };
@@ -0,0 +1,93 @@
1
+ import { a as IgniterJobsAdapter, H as IgniterJobsQueueManager, y as IgniterJobsBunSQLiteAdapterOptions, c as IgniterJobDefinition, q as IgniterCronDefinition, v as IgniterJobsAdapterDispatchParams, w as IgniterJobsAdapterScheduleParams, g as IgniterJobSearchResult, m as IgniterJobStatus, F as IgniterJobsJobLog, h as IgniterJobsQueueInfo, u as IgniterJobCounts, l as IgniterJobsQueueCleanOptions, i as IgniterJobsWorkerHandle, d as IgniterJobsWorkerBuilderConfig, f as IgniterJobsEventHandler } from '../adapter-Cax_40HW.mjs';
2
+ import 'ioredis';
3
+ import '@igniter-js/common';
4
+
5
+ /**
6
+ * @fileoverview Bun SQLite adapter for @igniter-js/jobs
7
+ * @module @igniter-js/jobs/adapters/bun-sqlite
8
+ */
9
+
10
+ /**
11
+ * Bun-native SQLite adapter for local, embedded, and desktop workloads.
12
+ */
13
+ declare class IgniterJobsBunSQLiteAdapter implements IgniterJobsAdapter {
14
+ readonly client: {
15
+ type: "bun-sqlite";
16
+ path: string;
17
+ };
18
+ readonly queues: IgniterJobsQueueManager;
19
+ private readonly options;
20
+ private bunqueueModulePromise;
21
+ private readonly queueRuntimes;
22
+ private readonly workers;
23
+ private readonly subscribers;
24
+ private readonly registeredJobs;
25
+ private readonly registeredCrons;
26
+ private constructor();
27
+ static create(options: IgniterJobsBunSQLiteAdapterOptions): IgniterJobsAdapter;
28
+ registerJob(queueName: string, jobName: string, definition: IgniterJobDefinition<any, any, any>): void;
29
+ registerCron(queueName: string, cronName: string, definition: IgniterCronDefinition<any, any>): void;
30
+ dispatch(params: IgniterJobsAdapterDispatchParams): Promise<string>;
31
+ schedule(params: IgniterJobsAdapterScheduleParams): Promise<string>;
32
+ getJob(jobId: string, queue?: string): Promise<IgniterJobSearchResult | null>;
33
+ getJobState(jobId: string, queue?: string): Promise<IgniterJobStatus | null>;
34
+ getJobLogs(jobId: string, queue?: string): Promise<IgniterJobsJobLog[]>;
35
+ getJobProgress(jobId: string, queue?: string): Promise<number>;
36
+ retryJob(jobId: string, queue?: string): Promise<void>;
37
+ removeJob(jobId: string, queue?: string): Promise<void>;
38
+ promoteJob(jobId: string, queue?: string): Promise<void>;
39
+ moveJobToFailed(jobId: string, reason: string, queue?: string): Promise<void>;
40
+ retryManyJobs(jobIds: string[], queue?: string): Promise<void>;
41
+ removeManyJobs(jobIds: string[], queue?: string): Promise<void>;
42
+ getQueueInfo(queue: string): Promise<IgniterJobsQueueInfo | null>;
43
+ getQueueJobCounts(queue: string): Promise<IgniterJobCounts>;
44
+ listQueues(): Promise<IgniterJobsQueueInfo[]>;
45
+ pauseQueue(queue: string): Promise<void>;
46
+ resumeQueue(queue: string): Promise<void>;
47
+ drainQueue(queue: string): Promise<number>;
48
+ cleanQueue(queue: string, options: IgniterJobsQueueCleanOptions): Promise<number>;
49
+ obliterateQueue(queue: string, _options?: {
50
+ force?: boolean;
51
+ }): Promise<void>;
52
+ retryAllInQueue(queue: string): Promise<number>;
53
+ searchJobs(filter: Record<string, unknown>): Promise<IgniterJobSearchResult[]>;
54
+ searchQueues(filter: Record<string, unknown>): Promise<IgniterJobsQueueInfo[]>;
55
+ searchWorkers(filter: Record<string, unknown>): Promise<IgniterJobsWorkerHandle[]>;
56
+ createWorker(config: IgniterJobsWorkerBuilderConfig): Promise<IgniterJobsWorkerHandle>;
57
+ getWorkers(): Map<string, IgniterJobsWorkerHandle>;
58
+ publishEvent(channel: string, payload: unknown): Promise<void>;
59
+ subscribeEvent(channel: string, handler: IgniterJobsEventHandler): Promise<() => Promise<void>>;
60
+ shutdown(): Promise<void>;
61
+ private loadBunqueue;
62
+ private getQueue;
63
+ private getAllQueueNames;
64
+ private markQueueCronsDirty;
65
+ private syncCronSchedulers;
66
+ private createEnvelope;
67
+ private toJobOptions;
68
+ private processJob;
69
+ private processRegisteredDefinition;
70
+ private processRegisteredCron;
71
+ private createExecutionContext;
72
+ private attachWorkerEvents;
73
+ private toWorkerHandle;
74
+ private buildWorkerMetrics;
75
+ private closeWorkerState;
76
+ private requireJob;
77
+ private findQueueByJobId;
78
+ private mapJob;
79
+ private mapJobSync;
80
+ private normalizeEnvelope;
81
+ private toPublicStatus;
82
+ private toBunqueueStatus;
83
+ private toBunqueueStates;
84
+ private distributeConcurrency;
85
+ private shouldExecuteScheduledJob;
86
+ private parseLogEntry;
87
+ private writeLog;
88
+ private writeQueueLog;
89
+ private invokeHook;
90
+ private invokeHandler;
91
+ }
92
+
93
+ export { IgniterJobsBunSQLiteAdapter, IgniterJobsBunSQLiteAdapterOptions };
@@ -0,0 +1,93 @@
1
+ import { a as IgniterJobsAdapter, H as IgniterJobsQueueManager, y as IgniterJobsBunSQLiteAdapterOptions, c as IgniterJobDefinition, q as IgniterCronDefinition, v as IgniterJobsAdapterDispatchParams, w as IgniterJobsAdapterScheduleParams, g as IgniterJobSearchResult, m as IgniterJobStatus, F as IgniterJobsJobLog, h as IgniterJobsQueueInfo, u as IgniterJobCounts, l as IgniterJobsQueueCleanOptions, i as IgniterJobsWorkerHandle, d as IgniterJobsWorkerBuilderConfig, f as IgniterJobsEventHandler } from '../adapter-Cax_40HW.js';
2
+ import 'ioredis';
3
+ import '@igniter-js/common';
4
+
5
+ /**
6
+ * @fileoverview Bun SQLite adapter for @igniter-js/jobs
7
+ * @module @igniter-js/jobs/adapters/bun-sqlite
8
+ */
9
+
10
+ /**
11
+ * Bun-native SQLite adapter for local, embedded, and desktop workloads.
12
+ */
13
+ declare class IgniterJobsBunSQLiteAdapter implements IgniterJobsAdapter {
14
+ readonly client: {
15
+ type: "bun-sqlite";
16
+ path: string;
17
+ };
18
+ readonly queues: IgniterJobsQueueManager;
19
+ private readonly options;
20
+ private bunqueueModulePromise;
21
+ private readonly queueRuntimes;
22
+ private readonly workers;
23
+ private readonly subscribers;
24
+ private readonly registeredJobs;
25
+ private readonly registeredCrons;
26
+ private constructor();
27
+ static create(options: IgniterJobsBunSQLiteAdapterOptions): IgniterJobsAdapter;
28
+ registerJob(queueName: string, jobName: string, definition: IgniterJobDefinition<any, any, any>): void;
29
+ registerCron(queueName: string, cronName: string, definition: IgniterCronDefinition<any, any>): void;
30
+ dispatch(params: IgniterJobsAdapterDispatchParams): Promise<string>;
31
+ schedule(params: IgniterJobsAdapterScheduleParams): Promise<string>;
32
+ getJob(jobId: string, queue?: string): Promise<IgniterJobSearchResult | null>;
33
+ getJobState(jobId: string, queue?: string): Promise<IgniterJobStatus | null>;
34
+ getJobLogs(jobId: string, queue?: string): Promise<IgniterJobsJobLog[]>;
35
+ getJobProgress(jobId: string, queue?: string): Promise<number>;
36
+ retryJob(jobId: string, queue?: string): Promise<void>;
37
+ removeJob(jobId: string, queue?: string): Promise<void>;
38
+ promoteJob(jobId: string, queue?: string): Promise<void>;
39
+ moveJobToFailed(jobId: string, reason: string, queue?: string): Promise<void>;
40
+ retryManyJobs(jobIds: string[], queue?: string): Promise<void>;
41
+ removeManyJobs(jobIds: string[], queue?: string): Promise<void>;
42
+ getQueueInfo(queue: string): Promise<IgniterJobsQueueInfo | null>;
43
+ getQueueJobCounts(queue: string): Promise<IgniterJobCounts>;
44
+ listQueues(): Promise<IgniterJobsQueueInfo[]>;
45
+ pauseQueue(queue: string): Promise<void>;
46
+ resumeQueue(queue: string): Promise<void>;
47
+ drainQueue(queue: string): Promise<number>;
48
+ cleanQueue(queue: string, options: IgniterJobsQueueCleanOptions): Promise<number>;
49
+ obliterateQueue(queue: string, _options?: {
50
+ force?: boolean;
51
+ }): Promise<void>;
52
+ retryAllInQueue(queue: string): Promise<number>;
53
+ searchJobs(filter: Record<string, unknown>): Promise<IgniterJobSearchResult[]>;
54
+ searchQueues(filter: Record<string, unknown>): Promise<IgniterJobsQueueInfo[]>;
55
+ searchWorkers(filter: Record<string, unknown>): Promise<IgniterJobsWorkerHandle[]>;
56
+ createWorker(config: IgniterJobsWorkerBuilderConfig): Promise<IgniterJobsWorkerHandle>;
57
+ getWorkers(): Map<string, IgniterJobsWorkerHandle>;
58
+ publishEvent(channel: string, payload: unknown): Promise<void>;
59
+ subscribeEvent(channel: string, handler: IgniterJobsEventHandler): Promise<() => Promise<void>>;
60
+ shutdown(): Promise<void>;
61
+ private loadBunqueue;
62
+ private getQueue;
63
+ private getAllQueueNames;
64
+ private markQueueCronsDirty;
65
+ private syncCronSchedulers;
66
+ private createEnvelope;
67
+ private toJobOptions;
68
+ private processJob;
69
+ private processRegisteredDefinition;
70
+ private processRegisteredCron;
71
+ private createExecutionContext;
72
+ private attachWorkerEvents;
73
+ private toWorkerHandle;
74
+ private buildWorkerMetrics;
75
+ private closeWorkerState;
76
+ private requireJob;
77
+ private findQueueByJobId;
78
+ private mapJob;
79
+ private mapJobSync;
80
+ private normalizeEnvelope;
81
+ private toPublicStatus;
82
+ private toBunqueueStatus;
83
+ private toBunqueueStates;
84
+ private distributeConcurrency;
85
+ private shouldExecuteScheduledJob;
86
+ private parseLogEntry;
87
+ private writeLog;
88
+ private writeQueueLog;
89
+ private invokeHook;
90
+ private invokeHandler;
91
+ }
92
+
93
+ export { IgniterJobsBunSQLiteAdapter, IgniterJobsBunSQLiteAdapterOptions };