@workglow/storage 0.2.27 → 0.2.29

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 (92) hide show
  1. package/dist/browser.d.ts +0 -10
  2. package/dist/browser.d.ts.map +1 -1
  3. package/dist/browser.js +406 -4207
  4. package/dist/browser.js.map +8 -24
  5. package/dist/bun.js +341 -7235
  6. package/dist/bun.js.map +8 -35
  7. package/dist/common-server.d.ts +0 -21
  8. package/dist/common-server.d.ts.map +1 -1
  9. package/dist/common.d.ts +1 -6
  10. package/dist/common.d.ts.map +1 -1
  11. package/dist/node.js +341 -7236
  12. package/dist/node.js.map +8 -35
  13. package/package.json +5 -71
  14. package/dist/kv/IndexedDbKvStorage.d.ts +0 -27
  15. package/dist/kv/IndexedDbKvStorage.d.ts.map +0 -1
  16. package/dist/kv/PostgresKvStorage.d.ts +0 -28
  17. package/dist/kv/PostgresKvStorage.d.ts.map +0 -1
  18. package/dist/kv/SqliteKvStorage.d.ts +0 -28
  19. package/dist/kv/SqliteKvStorage.d.ts.map +0 -1
  20. package/dist/kv/SupabaseKvStorage.d.ts +0 -33
  21. package/dist/kv/SupabaseKvStorage.d.ts.map +0 -1
  22. package/dist/postgres/browser.d.ts +0 -32
  23. package/dist/postgres/browser.d.ts.map +0 -1
  24. package/dist/postgres/browser.js +0 -150
  25. package/dist/postgres/browser.js.map +0 -11
  26. package/dist/postgres/node-bun.d.ts +0 -26
  27. package/dist/postgres/node-bun.d.ts.map +0 -1
  28. package/dist/postgres/node-bun.js +0 -41
  29. package/dist/postgres/node-bun.js.map +0 -10
  30. package/dist/postgres/pglite-pool.d.ts +0 -21
  31. package/dist/postgres/pglite-pool.d.ts.map +0 -1
  32. package/dist/queue/IQueueStorage.d.ts +0 -229
  33. package/dist/queue/IQueueStorage.d.ts.map +0 -1
  34. package/dist/queue/InMemoryQueueStorage.d.ts +0 -149
  35. package/dist/queue/InMemoryQueueStorage.d.ts.map +0 -1
  36. package/dist/queue/IndexedDbQueueStorage.d.ts +0 -166
  37. package/dist/queue/IndexedDbQueueStorage.d.ts.map +0 -1
  38. package/dist/queue/PostgresQueueStorage.d.ts +0 -154
  39. package/dist/queue/PostgresQueueStorage.d.ts.map +0 -1
  40. package/dist/queue/SqliteQueueStorage.d.ts +0 -149
  41. package/dist/queue/SqliteQueueStorage.d.ts.map +0 -1
  42. package/dist/queue/SupabaseQueueStorage.d.ts +0 -195
  43. package/dist/queue/SupabaseQueueStorage.d.ts.map +0 -1
  44. package/dist/queue/TelemetryQueueStorage.d.ts +0 -33
  45. package/dist/queue/TelemetryQueueStorage.d.ts.map +0 -1
  46. package/dist/queue-limiter/IRateLimiterStorage.d.ts +0 -127
  47. package/dist/queue-limiter/IRateLimiterStorage.d.ts.map +0 -1
  48. package/dist/queue-limiter/InMemoryRateLimiterStorage.d.ts +0 -43
  49. package/dist/queue-limiter/InMemoryRateLimiterStorage.d.ts.map +0 -1
  50. package/dist/queue-limiter/IndexedDbRateLimiterStorage.d.ts +0 -79
  51. package/dist/queue-limiter/IndexedDbRateLimiterStorage.d.ts.map +0 -1
  52. package/dist/queue-limiter/PostgresRateLimiterStorage.d.ts +0 -57
  53. package/dist/queue-limiter/PostgresRateLimiterStorage.d.ts.map +0 -1
  54. package/dist/queue-limiter/SqliteRateLimiterStorage.d.ts +0 -62
  55. package/dist/queue-limiter/SqliteRateLimiterStorage.d.ts.map +0 -1
  56. package/dist/queue-limiter/SupabaseRateLimiterStorage.d.ts +0 -54
  57. package/dist/queue-limiter/SupabaseRateLimiterStorage.d.ts.map +0 -1
  58. package/dist/sqlite/browser.d.ts +0 -37
  59. package/dist/sqlite/browser.d.ts.map +0 -1
  60. package/dist/sqlite/browser.js +0 -125
  61. package/dist/sqlite/browser.js.map +0 -10
  62. package/dist/sqlite/bun.d.ts +0 -32
  63. package/dist/sqlite/bun.d.ts.map +0 -1
  64. package/dist/sqlite/bun.js +0 -84
  65. package/dist/sqlite/bun.js.map +0 -10
  66. package/dist/sqlite/canonical-api.d.ts +0 -34
  67. package/dist/sqlite/canonical-api.d.ts.map +0 -1
  68. package/dist/sqlite/node.d.ts +0 -34
  69. package/dist/sqlite/node.d.ts.map +0 -1
  70. package/dist/sqlite/node.js +0 -65
  71. package/dist/sqlite/node.js.map +0 -10
  72. package/dist/tabular/IndexedDbTabularStorage.d.ts +0 -199
  73. package/dist/tabular/IndexedDbTabularStorage.d.ts.map +0 -1
  74. package/dist/tabular/PostgresTabularStorage.d.ts +0 -196
  75. package/dist/tabular/PostgresTabularStorage.d.ts.map +0 -1
  76. package/dist/tabular/SqliteTabularStorage.d.ts +0 -167
  77. package/dist/tabular/SqliteTabularStorage.d.ts.map +0 -1
  78. package/dist/tabular/SupabaseTabularStorage.d.ts +0 -174
  79. package/dist/tabular/SupabaseTabularStorage.d.ts.map +0 -1
  80. package/dist/util/IndexedDbTable.d.ts +0 -40
  81. package/dist/util/IndexedDbTable.d.ts.map +0 -1
  82. package/dist/util/traced.d.ts +0 -10
  83. package/dist/util/traced.d.ts.map +0 -1
  84. package/dist/vector/IndexedDbVectorStorage.d.ts +0 -53
  85. package/dist/vector/IndexedDbVectorStorage.d.ts.map +0 -1
  86. package/dist/vector/PostgresVectorStorage.d.ts +0 -39
  87. package/dist/vector/PostgresVectorStorage.d.ts.map +0 -1
  88. package/dist/vector/SqliteAiVectorStorage.d.ts +0 -100
  89. package/dist/vector/SqliteAiVectorStorage.d.ts.map +0 -1
  90. package/dist/vector/SqliteVectorStorage.d.ts +0 -49
  91. package/dist/vector/SqliteVectorStorage.d.ts.map +0 -1
  92. package/src/queue/README.md +0 -41
@@ -1,229 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export declare const QUEUE_STORAGE: import("@workglow/util").ServiceToken<IQueueStorage<any, any>>;
7
- /**
8
- * The type of a prefix column.
9
- * - "uuid" maps to UUID in PostgreSQL/Supabase, TEXT in SQLite/IndexedDB/InMemory
10
- * - "number" maps to INTEGER in PostgreSQL/Supabase/SQLite, number in IndexedDB/InMemory
11
- */
12
- export type PrefixColumnType = "uuid" | "number";
13
- /**
14
- * Defines a prefix column for queue storage filtering.
15
- */
16
- export interface PrefixColumn {
17
- readonly name: string;
18
- readonly type: PrefixColumnType;
19
- }
20
- /**
21
- * Options for configuring queue storage with prefix filters.
22
- */
23
- export interface QueueStorageOptions {
24
- /** The prefix column definitions for this storage */
25
- readonly prefixes?: readonly PrefixColumn[];
26
- /** The values for each prefix column */
27
- readonly prefixValues?: Readonly<Record<string, string | number>>;
28
- }
29
- export type JobStatus = "PENDING" | "PROCESSING" | "COMPLETED" | "ABORTING" | "FAILED" | "DISABLED";
30
- export declare const JobStatus: {
31
- readonly PENDING: "PENDING";
32
- readonly PROCESSING: "PROCESSING";
33
- readonly COMPLETED: "COMPLETED";
34
- readonly ABORTING: "ABORTING";
35
- readonly FAILED: "FAILED";
36
- readonly DISABLED: "DISABLED";
37
- };
38
- /**
39
- * Type of change that occurred in the queue.
40
- *
41
- * `RESYNC` is a synthetic event emitted by some backends (e.g. Postgres
42
- * LISTEN/NOTIFY) after a (re)connect to indicate that arbitrary changes may
43
- * have happened during a disconnect window. Subscribers should treat it as a
44
- * "kick the workers, re-poll state" signal — `old` and `new` are both
45
- * undefined.
46
- */
47
- export type QueueChangeType = "INSERT" | "UPDATE" | "DELETE" | "RESYNC";
48
- /**
49
- * Payload describing a change to a job
50
- */
51
- export interface QueueChangePayload<Input, Output> {
52
- readonly type: QueueChangeType;
53
- readonly old?: JobStorageFormat<Input, Output>;
54
- readonly new?: JobStorageFormat<Input, Output>;
55
- }
56
- /**
57
- * Options for subscribing to queue changes
58
- */
59
- export interface QueueSubscribeOptions {
60
- /** Polling interval in milliseconds (used by implementations that rely on polling) */
61
- readonly pollingIntervalMs?: number;
62
- /**
63
- * Custom prefix filter for this subscription.
64
- *
65
- * - If not provided (undefined): Uses the storage instance's configured prefixValues
66
- * - If empty object ({}): Receives ALL changes across all prefix combinations
67
- * - If partial object: Receives changes matching the specified subset of prefixes
68
- *
69
- * @example
70
- * // Storage configured with prefixes: [{name: "user_id"}, {name: "project_id"}]
71
- * // and prefixValues: {user_id: "abc", project_id: "123"}
72
- *
73
- * // Subscribe to only this user+project (default behavior)
74
- * storage.subscribeToChanges(callback);
75
- *
76
- * // Subscribe to all projects for this user
77
- * storage.subscribeToChanges(callback, { prefixFilter: { user_id: "abc" } });
78
- *
79
- * // Subscribe to ALL jobs in this queue (admin/supervisor view)
80
- * storage.subscribeToChanges(callback, { prefixFilter: {} });
81
- */
82
- readonly prefixFilter?: Readonly<Record<string, string | number>>;
83
- }
84
- /**
85
- * Details about a job that reflect the structure in the database.
86
- */
87
- export type JobStorageFormat<Input, Output> = {
88
- id?: unknown;
89
- job_run_id?: string;
90
- queue?: string;
91
- input: Input;
92
- output?: Output | null;
93
- error?: string | null;
94
- error_code?: string | null;
95
- fingerprint?: string;
96
- max_retries?: number;
97
- status?: JobStatus;
98
- created_at?: string;
99
- deadline_at?: string | null;
100
- last_ran_at?: string | null;
101
- run_after: string | null;
102
- completed_at: string | null;
103
- run_attempts?: number;
104
- progress?: number;
105
- progress_message?: string;
106
- progress_details?: Record<string, any> | null;
107
- worker_id?: string | null;
108
- };
109
- /**
110
- * Whether a queue storage's state is shared across processes.
111
- *
112
- * - `"process"` — in-memory / per-process state. Workers in the same process
113
- * share it, but separate processes do not.
114
- * - `"cluster"` — state lives in shared external storage (Postgres, Supabase,
115
- * etc.) visible to every process. Pairing a `"process"`-scoped limiter with
116
- * a `"cluster"`-scoped queue almost always indicates a misconfiguration.
117
- */
118
- export type QueueStorageScope = "process" | "cluster";
119
- /**
120
- * Interface defining the storage operations for a job queue
121
- */
122
- export interface IQueueStorage<Input, Output> {
123
- /**
124
- * Whether this storage is shared across processes. In-memory / browser
125
- * backends MUST report `"process"`. Shared databases (Postgres, Supabase)
126
- * report `"cluster"`. Used by JobQueueServer to detect process-scoped
127
- * limiters paired with cluster-scoped queues.
128
- */
129
- readonly scope: QueueStorageScope;
130
- /**
131
- * Adds a job to the queue storage
132
- * @param job - The job to add to the queue storage
133
- * @returns The ID of the job
134
- */
135
- add(job: JobStorageFormat<Input, Output>): Promise<unknown>;
136
- /**
137
- * Gets a job from the queue storage by ID
138
- * @param id - The ID of the job to get
139
- * @returns The job with the given ID
140
- */
141
- get(id: unknown): Promise<JobStorageFormat<Input, Output> | undefined>;
142
- /**
143
- * Gets the next job from the queue storage
144
- * @param workerId - Worker ID to associate with the job (required)
145
- * @returns The next job from the queue storage
146
- */
147
- next(workerId: string): Promise<JobStorageFormat<Input, Output> | undefined>;
148
- /**
149
- * Releases a job that was just claimed by {@link next} but won't be
150
- * processed (e.g. the worker was stopped mid-claim). Resets status to
151
- * PENDING and clears worker_id WITHOUT incrementing run_attempts —
152
- * the worker never actually attempted execution, so the retry budget
153
- * must be preserved.
154
- * @param id - The id of the claimed job to release.
155
- */
156
- release(id: unknown): Promise<void>;
157
- /**
158
- * Peeks at the next job(s) from the queue storage without removing them
159
- * @param status - The status of the jobs to peek at
160
- * @param num - The number of jobs to peek at
161
- * @returns The jobs with the given status
162
- */
163
- peek(status?: JobStatus, num?: number): Promise<Array<JobStorageFormat<Input, Output>>>;
164
- /**
165
- * Gets the size of the queue storage
166
- * @param status - The status of the jobs to get the size for
167
- * @returns The size of the queue storage
168
- */
169
- size(status?: JobStatus): Promise<number>;
170
- /**
171
- * Completes a job in the queue storage
172
- * @param job - The job to complete
173
- */
174
- complete(job: JobStorageFormat<Input, Output>): Promise<void>;
175
- /**
176
- * Deletes all jobs from the queue storage
177
- */
178
- deleteAll(): Promise<void>;
179
- /**
180
- * Gets the output for a given input from the queue storage
181
- * @param input - The input to get the output for
182
- * @returns The output of the job
183
- */
184
- outputForInput(input: Input): Promise<Output | null>;
185
- /**
186
- * Aborts a job in the queue storage
187
- * @param id - The ID of the job to abort
188
- */
189
- abort(id: unknown): Promise<void>;
190
- /**
191
- * Gets the jobs by job run ID from the queue storage
192
- * @param runId - The job run ID of the jobs to get
193
- * @returns The jobs with the given job run ID
194
- */
195
- getByRunId(runId: string): Promise<Array<JobStorageFormat<Input, Output>>>;
196
- /**
197
- * Saves progress updates for a job in the queue storage
198
- * @param id - The ID of the job to save the progress for
199
- * @param progress - The progress of the job
200
- * @param message - The message of the job
201
- * @param details - The details of the job
202
- */
203
- saveProgress(id: unknown, progress: number, message: string, details: Record<string, any> | null): Promise<void>;
204
- /**
205
- * Deletes a job by its ID from the queue storage
206
- * @param id - The ID of the job to delete
207
- */
208
- delete(id: unknown): Promise<void>;
209
- /**
210
- * Deletes jobs from the queue storage that are of a specific status and older than the specified time
211
- * @param status - The status of the jobs to delete
212
- * @param olderThanMs - The time in milliseconds that the jobs must be older than to be deleted
213
- */
214
- deleteJobsByStatusAndAge(status: JobStatus, olderThanMs: number): Promise<void>;
215
- /**
216
- * Sets up the database schema and tables.
217
- * This method should be called before using the storage in tests.
218
- * For production use, database setup should be done via migrations.
219
- */
220
- setupDatabase(): Promise<void>;
221
- /**
222
- * Subscribes to changes in the queue (including remote changes).
223
- * @param callback - Function called when a change occurs
224
- * @param options - Optional subscription options (e.g., polling interval)
225
- * @returns Unsubscribe function
226
- */
227
- subscribeToChanges(callback: (change: QueueChangePayload<Input, Output>) => void, options?: QueueSubscribeOptions): () => void;
228
- }
229
- //# sourceMappingURL=IQueueStorage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IQueueStorage.d.ts","sourceRoot":"","sources":["../../src/queue/IQueueStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,aAAa,gEAAkE,CAAC;AAE7F;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;CACjC;A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IACH,MAAM,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnC;;;;OAIG;IACH,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhF;;;;OAIG;IACH,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/B;;;;;OAKG;IACH,kBAAkB,CAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,EAC7D,OAAO,CAAC,EAAE,qBAAqB,GAC9B,MAAM,IAAI,CAAC;CACf"}
@@ -1,149 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { EventEmitter } from "@workglow/util";
7
- import { IQueueStorage, JobStatus, JobStorageFormat, QueueChangePayload, QueueStorageOptions, QueueSubscribeOptions } from "./IQueueStorage";
8
- /**
9
- * Event listeners for queue storage events
10
- */
11
- type QueueEventListeners<Input, Output> = {
12
- change: (payload: QueueChangePayload<Input, Output>) => void;
13
- };
14
- export declare const IN_MEMORY_QUEUE_STORAGE: import("@workglow/util").ServiceToken<IQueueStorage<any, any>>;
15
- /**
16
- * In-memory implementation of a job queue that manages asynchronous tasks.
17
- * Supports job scheduling, status tracking, result caching, and prefix-based filtering.
18
- */
19
- export declare class InMemoryQueueStorage<Input, Output> implements IQueueStorage<Input, Output> {
20
- readonly queueName: string;
21
- readonly scope: "process";
22
- /** The prefix values for filtering jobs */
23
- protected readonly prefixValues: Readonly<Record<string, string | number>>;
24
- /** Event emitter for change notifications */
25
- protected readonly events: EventEmitter<QueueEventListeners<Input, Output>>;
26
- /**
27
- * Creates a new in-memory job queue
28
- * @param queueName - Name of the queue
29
- * @param options - Optional configuration including prefix filters
30
- */
31
- constructor(queueName: string, options?: QueueStorageOptions);
32
- /** Internal array storing all jobs */
33
- jobQueue: Array<JobStorageFormat<Input, Output> & Record<string, unknown>>;
34
- /**
35
- * Checks if a job matches the current prefix values
36
- */
37
- private matchesPrefixes;
38
- /**
39
- * Returns a filtered and sorted list of pending jobs that are ready to run
40
- * Sorts by creation time to maintain FIFO order
41
- */
42
- private pendingQueue;
43
- /**
44
- * Adds a new job to the queue
45
- * Generates an ID and fingerprint if not provided
46
- */
47
- add(job: JobStorageFormat<Input, Output>): Promise<unknown>;
48
- /**
49
- * Retrieves a job from the queue by its id.
50
- * @param id - The id of the job to retrieve.
51
- * @returns A promise that resolves to the job or undefined if the job is not found.
52
- */
53
- get(id: unknown): Promise<JobStorageFormat<Input, Output> | undefined>;
54
- /**
55
- * Retrieves a slice of jobs from the queue.
56
- * @param status - The status of the jobs to retrieve.
57
- * @param num - The number of jobs to retrieve.
58
- * @returns A promise that resolves to an array of jobs.
59
- */
60
- peek(status?: JobStatus, num?: number): Promise<Array<JobStorageFormat<Input, Output>>>;
61
- /**
62
- * Retrieves the next available job that is ready to be processed
63
- * Updates the job status to PROCESSING before returning
64
- * @param workerId - Worker ID to associate with the job
65
- * @returns The next job or undefined if no job is available
66
- */
67
- next(workerId: string): Promise<JobStorageFormat<Input, Output> | undefined>;
68
- /**
69
- * Retrieves the size of the queue for a given status
70
- * @param status - The status of the jobs to retrieve.
71
- * @returns A promise that resolves to the number of jobs.
72
- */
73
- size(status?: "PENDING"): Promise<number>;
74
- /**
75
- * Saves the progress of a job
76
- * @param jobId - The id of the job to save the progress for.
77
- * @param progress - The progress of the job.
78
- * @param message - The message of the job.
79
- * @param details - The details of the job.
80
- */
81
- saveProgress(id: unknown, progress: number, message: string, details: Record<string, any> | null): Promise<void>;
82
- /**
83
- * Marks a job as complete with its output or error
84
- * Handles run_attempts for failed jobs and triggers completion callbacks
85
- * @param id - ID of the job to complete
86
- * @param output - Result of the job execution
87
- * @param error - Optional error message if job failed
88
- */
89
- complete(job: JobStorageFormat<Input, Output>): Promise<void>;
90
- /**
91
- * Releases a claimed job back to PENDING without incrementing run_attempts.
92
- * @param id - The id of the claimed job to release.
93
- */
94
- release(id: unknown): Promise<void>;
95
- /**
96
- * Aborts a job
97
- * @param id - The id of the job to abort.
98
- */
99
- abort(id: unknown): Promise<void>;
100
- /**
101
- * Retrieves all jobs by their job_run_id.
102
- * @param job_run_id - The job_run_id of the jobs to retrieve.
103
- * @returns A promise that resolves to an array of jobs.
104
- */
105
- getByRunId(runId: string): Promise<Array<JobStorageFormat<Input, Output>>>;
106
- /**
107
- * Deletes all jobs from the queue that match the current prefix values.
108
- */
109
- deleteAll(): Promise<void>;
110
- /**
111
- * Looks up cached output for a given input
112
- * Uses input fingerprinting for efficient matching
113
- * @param input - The input to look up the cached output for.
114
- * @returns The cached output or null if not found
115
- */
116
- outputForInput(input: Input): Promise<Output | null>;
117
- /**
118
- * Deletes a job by its ID
119
- */
120
- delete(id: unknown): Promise<void>;
121
- /**
122
- * Delete jobs with a specific status older than a cutoff date
123
- * @param status - Status of jobs to delete
124
- * @param olderThanMs - Delete jobs completed more than this many milliseconds ago
125
- */
126
- deleteJobsByStatusAndAge(status: JobStatus, olderThanMs: number): Promise<void>;
127
- /**
128
- * Sets up the database schema and tables.
129
- * No-op for in-memory storage as it doesn't require database setup.
130
- */
131
- setupDatabase(): Promise<void>;
132
- /**
133
- * Checks if a job matches the specified prefix filter
134
- * @param job - The job to check
135
- * @param prefixFilter - The prefix filter (undefined = use instance prefixes, {} = no filter)
136
- */
137
- private matchesPrefixFilter;
138
- /**
139
- * Subscribes to changes in the queue.
140
- * Since InMemory is both client and server, changes are detected via local events.
141
- *
142
- * @param callback - Function called when a change occurs
143
- * @param options - Subscription options including prefix filter
144
- * @returns Unsubscribe function
145
- */
146
- subscribeToChanges(callback: (change: QueueChangePayload<Input, Output>) => void, options?: QueueSubscribeOptions): () => void;
147
- }
148
- export {};
149
- //# sourceMappingURL=InMemoryQueueStorage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,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KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAWhE;IAED;;OAEG;IACU,MAAM,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAO9C;IAED;;;;OAIG;IACU,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB3F;IAED;;;OAGG;IACU,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAE1C;IAED;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IA2B3B;;;;;;;OAOG;IACI,kBAAkB,CACvB,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,EAC7D,OAAO,CAAC,EAAE,qBAAqB,GAC9B,MAAM,IAAI,CAiBZ;CACF"}
@@ -1,166 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { MigrationOptions } from "../util/IndexedDbTable";
7
- import { IQueueStorage, JobStatus, JobStorageFormat, PrefixColumn, QueueChangePayload, QueueStorageOptions, QueueSubscribeOptions } from "./IQueueStorage";
8
- export declare const INDEXED_DB_QUEUE_STORAGE: import("@workglow/util").ServiceToken<IQueueStorage<any, any>>;
9
- /**
10
- * Extended options for IndexedDB queue storage including prefix support
11
- */
12
- export interface IndexedDbQueueStorageOptions extends QueueStorageOptions, MigrationOptions {
13
- /** Enable BroadcastChannel notifications (default: true) */
14
- readonly useBroadcastChannel?: boolean;
15
- /** Backup polling interval in ms (default: 5000, 0 to disable) */
16
- readonly backupPollingIntervalMs?: number;
17
- }
18
- /**
19
- * IndexedDB implementation of a job queue storage.
20
- * Provides storage and retrieval for job execution states using IndexedDB.
21
- */
22
- export declare class IndexedDbQueueStorage<Input, Output> implements IQueueStorage<Input, Output> {
23
- readonly queueName: string;
24
- readonly scope: "process";
25
- private db;
26
- private readonly tableName;
27
- private readonly migrationOptions;
28
- /** The prefix column definitions */
29
- protected readonly prefixes: readonly PrefixColumn[];
30
- /** The prefix values for filtering */
31
- protected readonly prefixValues: Readonly<Record<string, string | number>>;
32
- /** Shared hybrid subscription manager */
33
- private hybridManager;
34
- /** Hybrid subscription options */
35
- private readonly hybridOptions;
36
- constructor(queueName: string, options?: IndexedDbQueueStorageOptions);
37
- /**
38
- * Gets prefix column names for use in indexes
39
- */
40
- private getPrefixColumnNames;
41
- /**
42
- * Checks if a job matches the current prefix values
43
- */
44
- private matchesPrefixes;
45
- /**
46
- * Gets prefix values as an array in column order for index key construction
47
- */
48
- private getPrefixKeyValues;
49
- private getDb;
50
- /**
51
- * Sets up the IndexedDB database table with the required schema and indexes.
52
- * Must be called before using any other methods.
53
- */
54
- setupDatabase(): Promise<void>;
55
- /**
56
- * Adds a job to the queue.
57
- * @param job - The job to add to the queue.
58
- * @returns A promise that resolves to the job id.
59
- */
60
- add(job: JobStorageFormat<Input, Output>): Promise<unknown>;
61
- /**
62
- * Retrieves a job from the queue by its id.
63
- * @param id - The id of the job to retrieve.
64
- * @returns A promise that resolves to the job or undefined if the job is not found.
65
- */
66
- get(id: unknown): Promise<JobStorageFormat<Input, Output> | undefined>;
67
- /**
68
- * Retrieves a slice of jobs from the queue.
69
- * @param status - The status of the jobs to retrieve.
70
- * @param num - The number of jobs to retrieve.
71
- * @returns A promise that resolves to an array of jobs.
72
- */
73
- peek(status?: JobStatus, num?: number): Promise<JobStorageFormat<Input, Output>[]>;
74
- /**
75
- * Retrieves the next job from the queue using optimistic locking. In case multiple workers
76
- * claim the same job, the first worker to claim it will process it and the other workers will return undefined.
77
- * This ONLY happens if workers are running in multiple tabs.
78
- *
79
- * IndexedDB uses snapshot isolation, so concurrent transactions can both see the same
80
- * PENDING job. To prevent processing the same job multiple times, this method:
81
- * 1. Claims a job by setting it to PROCESSING with a unique claim token
82
- * 2. After the transaction completes, re-reads the job to verify the claim succeeded
83
- * 3. If another worker claimed it first (different claim token), returns undefined
84
- *
85
- * @param workerId - Worker ID to associate with the job (required)
86
- * @returns A promise that resolves to the next job or undefined if the queue is empty.
87
- */
88
- next(workerId: string): Promise<JobStorageFormat<Input, Output> | undefined>;
89
- /**
90
- * Retrieves the number of jobs in the queue.
91
- * Returns the count of jobs in the queue.
92
- */
93
- size(status?: "PENDING"): Promise<number>;
94
- /**
95
- * Marks a job as complete with its output or error.
96
- */
97
- complete(job: JobStorageFormat<Input, Output>): Promise<void>;
98
- /**
99
- * Releases a claimed job without consuming a retry attempt.
100
- */
101
- release(id: unknown): Promise<void>;
102
- /**
103
- * Aborts a job in the queue.
104
- */
105
- abort(id: unknown): Promise<void>;
106
- /**
107
- * Gets jobs by their run ID.
108
- */
109
- getByRunId(job_run_id: string): Promise<JobStorageFormat<Input, Output>[]>;
110
- /**
111
- * Deletes all jobs from the queue.
112
- */
113
- deleteAll(): Promise<void>;
114
- /**
115
- * Gets the output for a given input.
116
- */
117
- outputForInput(input: Input): Promise<Output | null>;
118
- /**
119
- * Saves progress updates for a job.
120
- */
121
- saveProgress(id: unknown, progress: number, message: string, details: Record<string, any> | null): Promise<void>;
122
- private put;
123
- /**
124
- * Deletes a job by its ID.
125
- */
126
- delete(id: unknown): Promise<void>;
127
- /**
128
- * Delete jobs with a specific status older than a cutoff date
129
- * @param status - Status of jobs to delete
130
- * @param olderThanMs - Delete jobs completed more than this many milliseconds ago
131
- */
132
- deleteJobsByStatusAndAge(status: JobStatus, olderThanMs: number): Promise<void>;
133
- private getAllJobs;
134
- private getAllJobsWithFilter;
135
- /**
136
- * Checks if a prefix filter is custom (different from instance's prefixes).
137
- */
138
- private isCustomPrefixFilter;
139
- /**
140
- * Gets or creates the shared hybrid subscription manager for normal subscriptions.
141
- * This ensures all normal subscriptions share a single manager.
142
- */
143
- private getHybridManager;
144
- /**
145
- * Creates a dedicated polling subscription for custom prefix filters.
146
- * This runs separately from the normal polling manager.
147
- */
148
- private subscribeWithCustomPrefixFilter;
149
- /**
150
- * Subscribes to changes in the queue.
151
- * Uses polling since IndexedDB has no native cross-tab change notifications.
152
- *
153
- * Normal subscriptions (no custom prefix filter) share a single polling loop for efficiency.
154
- * Custom prefix filter subscriptions get their own dedicated polling loop with DB-level filtering.
155
- *
156
- * @param callback - Function called when a change occurs
157
- * @param options - Subscription options including polling interval and prefix filter
158
- * @returns Unsubscribe function
159
- */
160
- subscribeToChanges(callback: (change: QueueChangePayload<Input, Output>) => void, options?: QueueSubscribeOptions): () => void;
161
- /**
162
- * Cleanup method to destroy the hybrid manager
163
- */
164
- destroy(): void;
165
- }
166
- //# sourceMappingURL=IndexedDbQueueStorage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IndexedDbQueueStorage.d.ts","sourceRoot":"","sources":["../../src/queue/IndexedDbQueueStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAGL,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,wBAAwB,gEAEpC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,mBAAmB,EAAE,gBAAgB;IACzF,4DAA4D;IAC5D,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IACvC,kEAAkE;IAClE,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAC3C;AAED;;;GAGG;AACH,qBAAa,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAE,YAAW,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC;aAsBrE,SAAS,EAAE,MAAM;IArBnC,SAAgB,KAAK,EAAG,SAAS,CAAU;IAC3C,OAAO,CAAC,EAAE,CAA0B;IACpC,OAAO,CAAC,QAAQ,CAAC,SAA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