@orchestr-sh/orchestr 1.7.4 → 1.9.1
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.
- package/README.md +666 -0
- package/dist/Cache/CacheManager.d.ts +109 -0
- package/dist/Cache/CacheManager.d.ts.map +1 -0
- package/dist/Cache/CacheManager.js +181 -0
- package/dist/Cache/CacheManager.js.map +1 -0
- package/dist/Cache/CacheServiceProvider.d.ts +19 -0
- package/dist/Cache/CacheServiceProvider.d.ts.map +1 -0
- package/dist/Cache/CacheServiceProvider.js +71 -0
- package/dist/Cache/CacheServiceProvider.js.map +1 -0
- package/dist/Cache/Contracts/Lock.d.ts +31 -0
- package/dist/Cache/Contracts/Lock.d.ts.map +1 -0
- package/dist/Cache/Contracts/Lock.js +3 -0
- package/dist/Cache/Contracts/Lock.js.map +1 -0
- package/dist/Cache/Contracts/Repository.d.ts +59 -0
- package/dist/Cache/Contracts/Repository.d.ts.map +1 -0
- package/dist/Cache/Contracts/Repository.js +9 -0
- package/dist/Cache/Contracts/Repository.js.map +1 -0
- package/dist/Cache/Contracts/Store.d.ts +51 -0
- package/dist/Cache/Contracts/Store.d.ts.map +1 -0
- package/dist/Cache/Contracts/Store.js +3 -0
- package/dist/Cache/Contracts/Store.js.map +1 -0
- package/dist/Cache/Events/CacheFlushed.d.ts +11 -0
- package/dist/Cache/Events/CacheFlushed.d.ts.map +1 -0
- package/dist/Cache/Events/CacheFlushed.js +18 -0
- package/dist/Cache/Events/CacheFlushed.js.map +1 -0
- package/dist/Cache/Events/CacheHit.d.ts +13 -0
- package/dist/Cache/Events/CacheHit.d.ts.map +1 -0
- package/dist/Cache/Events/CacheHit.js +22 -0
- package/dist/Cache/Events/CacheHit.js.map +1 -0
- package/dist/Cache/Events/CacheMissed.d.ts +12 -0
- package/dist/Cache/Events/CacheMissed.d.ts.map +1 -0
- package/dist/Cache/Events/CacheMissed.js +20 -0
- package/dist/Cache/Events/CacheMissed.js.map +1 -0
- package/dist/Cache/Events/KeyForgotten.d.ts +12 -0
- package/dist/Cache/Events/KeyForgotten.d.ts.map +1 -0
- package/dist/Cache/Events/KeyForgotten.js +20 -0
- package/dist/Cache/Events/KeyForgotten.js.map +1 -0
- package/dist/Cache/Events/KeyWritten.d.ts +14 -0
- package/dist/Cache/Events/KeyWritten.d.ts.map +1 -0
- package/dist/Cache/Events/KeyWritten.js +24 -0
- package/dist/Cache/Events/KeyWritten.js.map +1 -0
- package/dist/Cache/Events/index.d.ts +6 -0
- package/dist/Cache/Events/index.d.ts.map +1 -0
- package/dist/Cache/Events/index.js +14 -0
- package/dist/Cache/Events/index.js.map +1 -0
- package/dist/Cache/Locks/CacheLock.d.ts +19 -0
- package/dist/Cache/Locks/CacheLock.d.ts.map +1 -0
- package/dist/Cache/Locks/CacheLock.js +49 -0
- package/dist/Cache/Locks/CacheLock.js.map +1 -0
- package/dist/Cache/Locks/Lock.d.ts +51 -0
- package/dist/Cache/Locks/Lock.d.ts.map +1 -0
- package/dist/Cache/Locks/Lock.js +83 -0
- package/dist/Cache/Locks/Lock.js.map +1 -0
- package/dist/Cache/Locks/LockTimeoutException.d.ts +9 -0
- package/dist/Cache/Locks/LockTimeoutException.d.ts.map +1 -0
- package/dist/Cache/Locks/LockTimeoutException.js +16 -0
- package/dist/Cache/Locks/LockTimeoutException.js.map +1 -0
- package/dist/Cache/Locks/index.d.ts +4 -0
- package/dist/Cache/Locks/index.d.ts.map +1 -0
- package/dist/Cache/Locks/index.js +10 -0
- package/dist/Cache/Locks/index.js.map +1 -0
- package/dist/Cache/Repository.d.ts +61 -0
- package/dist/Cache/Repository.d.ts.map +1 -0
- package/dist/Cache/Repository.js +207 -0
- package/dist/Cache/Repository.js.map +1 -0
- package/dist/Cache/Stores/ArrayStore.d.ts +44 -0
- package/dist/Cache/Stores/ArrayStore.d.ts.map +1 -0
- package/dist/Cache/Stores/ArrayStore.js +118 -0
- package/dist/Cache/Stores/ArrayStore.js.map +1 -0
- package/dist/Cache/Stores/DatabaseStore.d.ts +44 -0
- package/dist/Cache/Stores/DatabaseStore.d.ts.map +1 -0
- package/dist/Cache/Stores/DatabaseStore.js +165 -0
- package/dist/Cache/Stores/DatabaseStore.js.map +1 -0
- package/dist/Cache/Stores/FileStore.d.ts +50 -0
- package/dist/Cache/Stores/FileStore.d.ts.map +1 -0
- package/dist/Cache/Stores/FileStore.js +194 -0
- package/dist/Cache/Stores/FileStore.js.map +1 -0
- package/dist/Cache/Stores/NullStore.d.ts +22 -0
- package/dist/Cache/Stores/NullStore.d.ts.map +1 -0
- package/dist/Cache/Stores/NullStore.js +49 -0
- package/dist/Cache/Stores/NullStore.js.map +1 -0
- package/dist/Cache/Stores/index.d.ts +5 -0
- package/dist/Cache/Stores/index.d.ts.map +1 -0
- package/dist/Cache/Stores/index.js +12 -0
- package/dist/Cache/Stores/index.js.map +1 -0
- package/dist/Cache/Tags/TagSet.d.ts +39 -0
- package/dist/Cache/Tags/TagSet.d.ts.map +1 -0
- package/dist/Cache/Tags/TagSet.js +72 -0
- package/dist/Cache/Tags/TagSet.js.map +1 -0
- package/dist/Cache/Tags/TaggedCache.d.ts +54 -0
- package/dist/Cache/Tags/TaggedCache.d.ts.map +1 -0
- package/dist/Cache/Tags/TaggedCache.js +125 -0
- package/dist/Cache/Tags/TaggedCache.js.map +1 -0
- package/dist/Cache/Tags/index.d.ts +3 -0
- package/dist/Cache/Tags/index.d.ts.map +1 -0
- package/dist/Cache/Tags/index.js +8 -0
- package/dist/Cache/Tags/index.js.map +1 -0
- package/dist/Cache/index.d.ts +27 -0
- package/dist/Cache/index.d.ts.map +1 -0
- package/dist/Cache/index.js +48 -0
- package/dist/Cache/index.js.map +1 -0
- package/dist/Console/Commands/CacheClearCommand.d.ts +16 -0
- package/dist/Console/Commands/CacheClearCommand.d.ts.map +1 -0
- package/dist/Console/Commands/CacheClearCommand.js +33 -0
- package/dist/Console/Commands/CacheClearCommand.js.map +1 -0
- package/dist/Console/Commands/CacheForgetCommand.d.ts +16 -0
- package/dist/Console/Commands/CacheForgetCommand.d.ts.map +1 -0
- package/dist/Console/Commands/CacheForgetCommand.js +39 -0
- package/dist/Console/Commands/CacheForgetCommand.js.map +1 -0
- package/dist/Console/Commands/CacheTableCommand.d.ts +17 -0
- package/dist/Console/Commands/CacheTableCommand.d.ts.map +1 -0
- package/dist/Console/Commands/CacheTableCommand.js +92 -0
- package/dist/Console/Commands/CacheTableCommand.js.map +1 -0
- package/dist/Console/Commands/MakeJobCommand.d.ts +20 -0
- package/dist/Console/Commands/MakeJobCommand.d.ts.map +1 -0
- package/dist/Console/Commands/MakeJobCommand.js +165 -0
- package/dist/Console/Commands/MakeJobCommand.js.map +1 -0
- package/dist/Console/Commands/QueueBatchesTableCommand.d.ts +17 -0
- package/dist/Console/Commands/QueueBatchesTableCommand.d.ts.map +1 -0
- package/dist/Console/Commands/QueueBatchesTableCommand.js +92 -0
- package/dist/Console/Commands/QueueBatchesTableCommand.js.map +1 -0
- package/dist/Console/Commands/QueueClearCommand.d.ts +16 -0
- package/dist/Console/Commands/QueueClearCommand.d.ts.map +1 -0
- package/dist/Console/Commands/QueueClearCommand.js +29 -0
- package/dist/Console/Commands/QueueClearCommand.js.map +1 -0
- package/dist/Console/Commands/QueueFailedCommand.d.ts +18 -0
- package/dist/Console/Commands/QueueFailedCommand.d.ts.map +1 -0
- package/dist/Console/Commands/QueueFailedCommand.js +76 -0
- package/dist/Console/Commands/QueueFailedCommand.js.map +1 -0
- package/dist/Console/Commands/QueueFailedTableCommand.d.ts +17 -0
- package/dist/Console/Commands/QueueFailedTableCommand.d.ts.map +1 -0
- package/dist/Console/Commands/QueueFailedTableCommand.js +89 -0
- package/dist/Console/Commands/QueueFailedTableCommand.js.map +1 -0
- package/dist/Console/Commands/QueueFlushCommand.d.ts +18 -0
- package/dist/Console/Commands/QueueFlushCommand.d.ts.map +1 -0
- package/dist/Console/Commands/QueueFlushCommand.js +44 -0
- package/dist/Console/Commands/QueueFlushCommand.js.map +1 -0
- package/dist/Console/Commands/QueueForgetCommand.d.ts +18 -0
- package/dist/Console/Commands/QueueForgetCommand.d.ts.map +1 -0
- package/dist/Console/Commands/QueueForgetCommand.js +48 -0
- package/dist/Console/Commands/QueueForgetCommand.js.map +1 -0
- package/dist/Console/Commands/QueueMonitorCommand.d.ts +16 -0
- package/dist/Console/Commands/QueueMonitorCommand.d.ts.map +1 -0
- package/dist/Console/Commands/QueueMonitorCommand.js +42 -0
- package/dist/Console/Commands/QueueMonitorCommand.js.map +1 -0
- package/dist/Console/Commands/QueuePruneBatchesCommand.d.ts +16 -0
- package/dist/Console/Commands/QueuePruneBatchesCommand.d.ts.map +1 -0
- package/dist/Console/Commands/QueuePruneBatchesCommand.js +44 -0
- package/dist/Console/Commands/QueuePruneBatchesCommand.js.map +1 -0
- package/dist/Console/Commands/QueuePruneFailedCommand.d.ts +18 -0
- package/dist/Console/Commands/QueuePruneFailedCommand.d.ts.map +1 -0
- package/dist/Console/Commands/QueuePruneFailedCommand.js +39 -0
- package/dist/Console/Commands/QueuePruneFailedCommand.js.map +1 -0
- package/dist/Console/Commands/QueueRestartCommand.d.ts +16 -0
- package/dist/Console/Commands/QueueRestartCommand.d.ts.map +1 -0
- package/dist/Console/Commands/QueueRestartCommand.js +34 -0
- package/dist/Console/Commands/QueueRestartCommand.js.map +1 -0
- package/dist/Console/Commands/QueueRetryCommand.d.ts +20 -0
- package/dist/Console/Commands/QueueRetryCommand.d.ts.map +1 -0
- package/dist/Console/Commands/QueueRetryCommand.js +77 -0
- package/dist/Console/Commands/QueueRetryCommand.js.map +1 -0
- package/dist/Console/Commands/QueueTableCommand.d.ts +17 -0
- package/dist/Console/Commands/QueueTableCommand.d.ts.map +1 -0
- package/dist/Console/Commands/QueueTableCommand.js +89 -0
- package/dist/Console/Commands/QueueTableCommand.js.map +1 -0
- package/dist/Console/Commands/QueueWorkCommand.d.ts +16 -0
- package/dist/Console/Commands/QueueWorkCommand.d.ts.map +1 -0
- package/dist/Console/Commands/QueueWorkCommand.js +51 -0
- package/dist/Console/Commands/QueueWorkCommand.js.map +1 -0
- package/dist/Facades/Bus.d.ts +62 -0
- package/dist/Facades/Bus.d.ts.map +1 -0
- package/dist/Facades/Bus.js +102 -0
- package/dist/Facades/Bus.js.map +1 -0
- package/dist/Facades/Cache.d.ts +41 -0
- package/dist/Facades/Cache.d.ts.map +1 -0
- package/dist/Facades/Cache.js +78 -0
- package/dist/Facades/Cache.js.map +1 -0
- package/dist/Facades/Queue.d.ts +42 -0
- package/dist/Facades/Queue.d.ts.map +1 -0
- package/dist/Facades/Queue.js +71 -0
- package/dist/Facades/Queue.js.map +1 -0
- package/dist/Facades/index.d.ts +3 -0
- package/dist/Facades/index.d.ts.map +1 -1
- package/dist/Facades/index.js +7 -1
- package/dist/Facades/index.js.map +1 -1
- package/dist/Queue/Batching/Batch.d.ts +86 -0
- package/dist/Queue/Batching/Batch.d.ts.map +1 -0
- package/dist/Queue/Batching/Batch.js +170 -0
- package/dist/Queue/Batching/Batch.js.map +1 -0
- package/dist/Queue/Batching/PendingBatch.d.ts +72 -0
- package/dist/Queue/Batching/PendingBatch.d.ts.map +1 -0
- package/dist/Queue/Batching/PendingBatch.js +122 -0
- package/dist/Queue/Batching/PendingBatch.js.map +1 -0
- package/dist/Queue/Batching/index.d.ts +3 -0
- package/dist/Queue/Batching/index.d.ts.map +1 -0
- package/dist/Queue/Batching/index.js +8 -0
- package/dist/Queue/Batching/index.js.map +1 -0
- package/dist/Queue/Concerns/Dispatchable.d.ts +36 -0
- package/dist/Queue/Concerns/Dispatchable.d.ts.map +1 -0
- package/dist/Queue/Concerns/Dispatchable.js +102 -0
- package/dist/Queue/Concerns/Dispatchable.js.map +1 -0
- package/dist/Queue/Contracts/QueueDriver.d.ts +67 -0
- package/dist/Queue/Contracts/QueueDriver.d.ts.map +1 -0
- package/dist/Queue/Contracts/QueueDriver.js +9 -0
- package/dist/Queue/Contracts/QueueDriver.js.map +1 -0
- package/dist/Queue/Contracts/QueueableJob.d.ts +74 -0
- package/dist/Queue/Contracts/QueueableJob.d.ts.map +1 -0
- package/dist/Queue/Contracts/QueueableJob.js +9 -0
- package/dist/Queue/Contracts/QueueableJob.js.map +1 -0
- package/dist/Queue/Contracts/ShouldBeUnique.d.ts +43 -0
- package/dist/Queue/Contracts/ShouldBeUnique.d.ts.map +1 -0
- package/dist/Queue/Contracts/ShouldBeUnique.js +12 -0
- package/dist/Queue/Contracts/ShouldBeUnique.js.map +1 -0
- package/dist/Queue/Drivers/DatabaseDriver.d.ts +39 -0
- package/dist/Queue/Drivers/DatabaseDriver.d.ts.map +1 -0
- package/dist/Queue/Drivers/DatabaseDriver.js +176 -0
- package/dist/Queue/Drivers/DatabaseDriver.js.map +1 -0
- package/dist/Queue/Drivers/NullDriver.d.ts +30 -0
- package/dist/Queue/Drivers/NullDriver.d.ts.map +1 -0
- package/dist/Queue/Drivers/NullDriver.js +57 -0
- package/dist/Queue/Drivers/NullDriver.js.map +1 -0
- package/dist/Queue/Drivers/SyncDriver.d.ts +29 -0
- package/dist/Queue/Drivers/SyncDriver.d.ts.map +1 -0
- package/dist/Queue/Drivers/SyncDriver.js +67 -0
- package/dist/Queue/Drivers/SyncDriver.js.map +1 -0
- package/dist/Queue/Drivers/index.d.ts +4 -0
- package/dist/Queue/Drivers/index.d.ts.map +1 -0
- package/dist/Queue/Drivers/index.js +10 -0
- package/dist/Queue/Drivers/index.js.map +1 -0
- package/dist/Queue/Events/JobExceptionOccurred.d.ts +13 -0
- package/dist/Queue/Events/JobExceptionOccurred.d.ts.map +1 -0
- package/dist/Queue/Events/JobExceptionOccurred.js +20 -0
- package/dist/Queue/Events/JobExceptionOccurred.js.map +1 -0
- package/dist/Queue/Events/JobFailed.d.ts +13 -0
- package/dist/Queue/Events/JobFailed.d.ts.map +1 -0
- package/dist/Queue/Events/JobFailed.js +20 -0
- package/dist/Queue/Events/JobFailed.js.map +1 -0
- package/dist/Queue/Events/JobProcessed.d.ts +12 -0
- package/dist/Queue/Events/JobProcessed.d.ts.map +1 -0
- package/dist/Queue/Events/JobProcessed.js +18 -0
- package/dist/Queue/Events/JobProcessed.js.map +1 -0
- package/dist/Queue/Events/JobProcessing.d.ts +12 -0
- package/dist/Queue/Events/JobProcessing.d.ts.map +1 -0
- package/dist/Queue/Events/JobProcessing.js +18 -0
- package/dist/Queue/Events/JobProcessing.js.map +1 -0
- package/dist/Queue/Events/JobQueued.d.ts +14 -0
- package/dist/Queue/Events/JobQueued.d.ts.map +1 -0
- package/dist/Queue/Events/JobQueued.js +22 -0
- package/dist/Queue/Events/JobQueued.js.map +1 -0
- package/dist/Queue/Events/JobRetryRequested.d.ts +12 -0
- package/dist/Queue/Events/JobRetryRequested.d.ts.map +1 -0
- package/dist/Queue/Events/JobRetryRequested.js +20 -0
- package/dist/Queue/Events/JobRetryRequested.js.map +1 -0
- package/dist/Queue/Events/WorkerStopping.d.ts +11 -0
- package/dist/Queue/Events/WorkerStopping.d.ts.map +1 -0
- package/dist/Queue/Events/WorkerStopping.js +18 -0
- package/dist/Queue/Events/WorkerStopping.js.map +1 -0
- package/dist/Queue/Events/index.d.ts +8 -0
- package/dist/Queue/Events/index.d.ts.map +1 -0
- package/dist/Queue/Events/index.js +18 -0
- package/dist/Queue/Events/index.js.map +1 -0
- package/dist/Queue/Failed/DatabaseFailedJobProvider.d.ts +33 -0
- package/dist/Queue/Failed/DatabaseFailedJobProvider.d.ts.map +1 -0
- package/dist/Queue/Failed/DatabaseFailedJobProvider.js +100 -0
- package/dist/Queue/Failed/DatabaseFailedJobProvider.js.map +1 -0
- package/dist/Queue/Failed/FailedJobProvider.d.ts +42 -0
- package/dist/Queue/Failed/FailedJobProvider.d.ts.map +1 -0
- package/dist/Queue/Failed/FailedJobProvider.js +9 -0
- package/dist/Queue/Failed/FailedJobProvider.js.map +1 -0
- package/dist/Queue/Job.d.ts +194 -0
- package/dist/Queue/Job.d.ts.map +1 -0
- package/dist/Queue/Job.js +286 -0
- package/dist/Queue/Job.js.map +1 -0
- package/dist/Queue/JobPayload.d.ts +37 -0
- package/dist/Queue/JobPayload.d.ts.map +1 -0
- package/dist/Queue/JobPayload.js +46 -0
- package/dist/Queue/JobPayload.js.map +1 -0
- package/dist/Queue/Middleware/JobMiddleware.d.ts +29 -0
- package/dist/Queue/Middleware/JobMiddleware.d.ts.map +1 -0
- package/dist/Queue/Middleware/JobMiddleware.js +21 -0
- package/dist/Queue/Middleware/JobMiddleware.js.map +1 -0
- package/dist/Queue/Middleware/RateLimited.d.ts +56 -0
- package/dist/Queue/Middleware/RateLimited.d.ts.map +1 -0
- package/dist/Queue/Middleware/RateLimited.js +83 -0
- package/dist/Queue/Middleware/RateLimited.js.map +1 -0
- package/dist/Queue/Middleware/ThrottlesExceptions.d.ts +71 -0
- package/dist/Queue/Middleware/ThrottlesExceptions.d.ts.map +1 -0
- package/dist/Queue/Middleware/ThrottlesExceptions.js +119 -0
- package/dist/Queue/Middleware/ThrottlesExceptions.js.map +1 -0
- package/dist/Queue/Middleware/WithoutOverlapping.d.ts +64 -0
- package/dist/Queue/Middleware/WithoutOverlapping.d.ts.map +1 -0
- package/dist/Queue/Middleware/WithoutOverlapping.js +103 -0
- package/dist/Queue/Middleware/WithoutOverlapping.js.map +1 -0
- package/dist/Queue/Middleware/index.d.ts +5 -0
- package/dist/Queue/Middleware/index.d.ts.map +1 -0
- package/dist/Queue/Middleware/index.js +10 -0
- package/dist/Queue/Middleware/index.js.map +1 -0
- package/dist/Queue/PendingChain.d.ts +63 -0
- package/dist/Queue/PendingChain.d.ts.map +1 -0
- package/dist/Queue/PendingChain.js +111 -0
- package/dist/Queue/PendingChain.js.map +1 -0
- package/dist/Queue/PendingDispatch.d.ts +66 -0
- package/dist/Queue/PendingDispatch.d.ts.map +1 -0
- package/dist/Queue/PendingDispatch.js +101 -0
- package/dist/Queue/PendingDispatch.js.map +1 -0
- package/dist/Queue/QueueManager.d.ts +151 -0
- package/dist/Queue/QueueManager.d.ts.map +1 -0
- package/dist/Queue/QueueManager.js +227 -0
- package/dist/Queue/QueueManager.js.map +1 -0
- package/dist/Queue/QueueServiceProvider.d.ts +19 -0
- package/dist/Queue/QueueServiceProvider.d.ts.map +1 -0
- package/dist/Queue/QueueServiceProvider.js +75 -0
- package/dist/Queue/QueueServiceProvider.js.map +1 -0
- package/dist/Queue/Workers/Worker.d.ts +99 -0
- package/dist/Queue/Workers/Worker.d.ts.map +1 -0
- package/dist/Queue/Workers/Worker.js +324 -0
- package/dist/Queue/Workers/Worker.js.map +1 -0
- package/dist/Queue/Workers/WorkerOptions.d.ts +62 -0
- package/dist/Queue/Workers/WorkerOptions.d.ts.map +1 -0
- package/dist/Queue/Workers/WorkerOptions.js +23 -0
- package/dist/Queue/Workers/WorkerOptions.js.map +1 -0
- package/dist/Queue/index.d.ts +41 -0
- package/dist/Queue/index.d.ts.map +1 -0
- package/dist/Queue/index.js +67 -0
- package/dist/Queue/index.js.map +1 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +141 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JobPayload
|
|
3
|
+
*
|
|
4
|
+
* Represents the serialized structure of a job stored in the queue.
|
|
5
|
+
* This is the format that gets stored in the database/redis/etc.
|
|
6
|
+
*/
|
|
7
|
+
import type { Job } from './Job';
|
|
8
|
+
export interface JobPayloadData {
|
|
9
|
+
uuid: string;
|
|
10
|
+
displayName: string;
|
|
11
|
+
job: string;
|
|
12
|
+
data: Record<string, any>;
|
|
13
|
+
maxTries: number | null;
|
|
14
|
+
maxExceptions: number | null;
|
|
15
|
+
failOnTimeout: boolean;
|
|
16
|
+
backoff: number | number[] | null;
|
|
17
|
+
timeout: number | null;
|
|
18
|
+
retryUntil: number | null;
|
|
19
|
+
attempts: number;
|
|
20
|
+
afterCommit: boolean;
|
|
21
|
+
pushedAt: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class JobPayload {
|
|
24
|
+
/**
|
|
25
|
+
* Create a payload from a job instance
|
|
26
|
+
*/
|
|
27
|
+
static create(job: Job): JobPayloadData;
|
|
28
|
+
/**
|
|
29
|
+
* Serialize a payload to a JSON string
|
|
30
|
+
*/
|
|
31
|
+
static serialize(payload: JobPayloadData): string;
|
|
32
|
+
/**
|
|
33
|
+
* Deserialize a JSON string to a payload
|
|
34
|
+
*/
|
|
35
|
+
static deserialize(raw: string): JobPayloadData;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=JobPayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobPayload.d.ts","sourceRoot":"","sources":["../../src/Queue/JobPayload.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,UAAU;IACrB;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,cAAc;IAkBvC;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM;IAIjD;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc;CAGhD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* JobPayload
|
|
4
|
+
*
|
|
5
|
+
* Represents the serialized structure of a job stored in the queue.
|
|
6
|
+
* This is the format that gets stored in the database/redis/etc.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.JobPayload = void 0;
|
|
10
|
+
const crypto_1 = require("crypto");
|
|
11
|
+
class JobPayload {
|
|
12
|
+
/**
|
|
13
|
+
* Create a payload from a job instance
|
|
14
|
+
*/
|
|
15
|
+
static create(job) {
|
|
16
|
+
return {
|
|
17
|
+
uuid: job.uuid || (0, crypto_1.randomUUID)(),
|
|
18
|
+
displayName: job.displayName(),
|
|
19
|
+
job: job.constructor.name,
|
|
20
|
+
data: job.toJSON(),
|
|
21
|
+
maxTries: job.tries ?? null,
|
|
22
|
+
maxExceptions: job.maxExceptions ?? null,
|
|
23
|
+
failOnTimeout: job.failOnTimeout ?? false,
|
|
24
|
+
backoff: job.backoff ?? null,
|
|
25
|
+
timeout: job.timeout ?? null,
|
|
26
|
+
retryUntil: job.retryUntil ? job.retryUntil.getTime() : null,
|
|
27
|
+
attempts: 0,
|
|
28
|
+
afterCommit: job.afterCommit ?? false,
|
|
29
|
+
pushedAt: new Date().toISOString(),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Serialize a payload to a JSON string
|
|
34
|
+
*/
|
|
35
|
+
static serialize(payload) {
|
|
36
|
+
return JSON.stringify(payload);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Deserialize a JSON string to a payload
|
|
40
|
+
*/
|
|
41
|
+
static deserialize(raw) {
|
|
42
|
+
return JSON.parse(raw);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.JobPayload = JobPayload;
|
|
46
|
+
//# s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
|
1
|
+
/**
|
|
2
|
+
* JobMiddleware Contract
|
|
3
|
+
*
|
|
4
|
+
* Defines the interface for job middleware.
|
|
5
|
+
* Mirrors Laravel's queue middleware pattern.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* class RateLimited implements JobMiddleware {
|
|
10
|
+
* constructor(private key: string) {}
|
|
11
|
+
*
|
|
12
|
+
* async handle(job: Job, next: () => Promise<void>): Promise<void> {
|
|
13
|
+
* // Rate limiting logic...
|
|
14
|
+
* await next();
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
import type { Job } from '../Job';
|
|
20
|
+
export interface JobMiddleware {
|
|
21
|
+
/**
|
|
22
|
+
* Process the job through this middleware
|
|
23
|
+
*
|
|
24
|
+
* @param job - The job being processed
|
|
25
|
+
* @param next - Call to pass execution to the next middleware
|
|
26
|
+
*/
|
|
27
|
+
handle(job: Job, next: () => Promise<void>): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=JobMiddleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobMiddleware.d.ts","sourceRoot":"","sources":["../../../src/Queue/Middleware/JobMiddleware.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAElC,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* JobMiddleware Contract
|
|
4
|
+
*
|
|
5
|
+
* Defines the interface for job middleware.
|
|
6
|
+
* Mirrors Laravel's queue middleware pattern.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* class RateLimited implements JobMiddleware {
|
|
11
|
+
* constructor(private key: string) {}
|
|
12
|
+
*
|
|
13
|
+
* async handle(job: Job, next: () => Promise<void>): Promise<void> {
|
|
14
|
+
* // Rate limiting logic...
|
|
15
|
+
* await next();
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
//# sourceMappingURL=JobMiddleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobMiddleware.js","sourceRoot":"","sources":["../../../src/Queue/Middleware/JobMiddleware.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RateLimited Middleware
|
|
3
|
+
*
|
|
4
|
+
* Rate limits job execution. When the rate limit is exceeded,
|
|
5
|
+
* the job is released back onto the queue.
|
|
6
|
+
*
|
|
7
|
+
* Mirrors Laravel's Illuminate\Queue\Middleware\RateLimited.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* class ProcessPodcast extends Job {
|
|
12
|
+
* middleware() {
|
|
13
|
+
* return [new RateLimited('podcasts', 10, 60)];
|
|
14
|
+
* }
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
import type { Job } from '../Job';
|
|
19
|
+
import type { JobMiddleware } from './JobMiddleware';
|
|
20
|
+
export declare class RateLimited implements JobMiddleware {
|
|
21
|
+
/**
|
|
22
|
+
* The rate limiter key
|
|
23
|
+
*/
|
|
24
|
+
protected key: string;
|
|
25
|
+
/**
|
|
26
|
+
* The maximum number of attempts within the decay period
|
|
27
|
+
*/
|
|
28
|
+
protected maxAttempts: number;
|
|
29
|
+
/**
|
|
30
|
+
* The number of seconds until the rate limit resets
|
|
31
|
+
*/
|
|
32
|
+
protected decaySeconds: number;
|
|
33
|
+
/**
|
|
34
|
+
* The number of seconds to release the job for when rate limited
|
|
35
|
+
*/
|
|
36
|
+
protected releaseAfterSeconds: number;
|
|
37
|
+
constructor(
|
|
38
|
+
/**
|
|
39
|
+
* The rate limiter key
|
|
40
|
+
*/
|
|
41
|
+
key: string,
|
|
42
|
+
/**
|
|
43
|
+
* The maximum number of attempts within the decay period
|
|
44
|
+
*/
|
|
45
|
+
maxAttempts?: number,
|
|
46
|
+
/**
|
|
47
|
+
* The number of seconds until the rate limit resets
|
|
48
|
+
*/
|
|
49
|
+
decaySeconds?: number);
|
|
50
|
+
handle(job: Job, next: () => Promise<void>): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Set the number of seconds to release the job for
|
|
53
|
+
*/
|
|
54
|
+
releaseAfter(seconds: number): this;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=RateLimited.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RateLimited.d.ts","sourceRoot":"","sources":["../../../src/Queue/Middleware/RateLimited.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKrD,qBAAa,WAAY,YAAW,aAAa;IAO7C;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM;IAErB;;OAEG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM;IAE7B;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,MAAM;IAnBhC;;OAEG;IACH,SAAS,CAAC,mBAAmB,EAAE,MAAM,CAAK;;IAGxC;;OAEG;IACO,GAAG,EAAE,MAAM;IAErB;;OAEG;IACO,WAAW,GAAE,MAAU;IAEjC;;OAEG;IACO,YAAY,GAAE,MAAW;IAG/B,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BhE;;OAEG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAIpC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* RateLimited Middleware
|
|
4
|
+
*
|
|
5
|
+
* Rate limits job execution. When the rate limit is exceeded,
|
|
6
|
+
* the job is released back onto the queue.
|
|
7
|
+
*
|
|
8
|
+
* Mirrors Laravel's Illuminate\Queue\Middleware\RateLimited.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* class ProcessPodcast extends Job {
|
|
13
|
+
* middleware() {
|
|
14
|
+
* return [new RateLimited('podcasts', 10, 60)];
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.RateLimited = void 0;
|
|
21
|
+
// Simple in-memory rate limiter store
|
|
22
|
+
const rateLimiterStore = new Map();
|
|
23
|
+
class RateLimited {
|
|
24
|
+
key;
|
|
25
|
+
maxAttempts;
|
|
26
|
+
decaySeconds;
|
|
27
|
+
/**
|
|
28
|
+
* The number of seconds to release the job for when rate limited
|
|
29
|
+
*/
|
|
30
|
+
releaseAfterSeconds = 0;
|
|
31
|
+
constructor(
|
|
32
|
+
/**
|
|
33
|
+
* The rate limiter key
|
|
34
|
+
*/
|
|
35
|
+
key,
|
|
36
|
+
/**
|
|
37
|
+
* The maximum number of attempts within the decay period
|
|
38
|
+
*/
|
|
39
|
+
maxAttempts = 1,
|
|
40
|
+
/**
|
|
41
|
+
* The number of seconds until the rate limit resets
|
|
42
|
+
*/
|
|
43
|
+
decaySeconds = 60) {
|
|
44
|
+
this.key = key;
|
|
45
|
+
this.maxAttempts = maxAttempts;
|
|
46
|
+
this.decaySeconds = decaySeconds;
|
|
47
|
+
}
|
|
48
|
+
async handle(job, next) {
|
|
49
|
+
const now = Math.floor(Date.now() / 1000);
|
|
50
|
+
const limiter = rateLimiterStore.get(this.key);
|
|
51
|
+
// Check if the rate limit has expired
|
|
52
|
+
if (limiter && limiter.resetAt <= now) {
|
|
53
|
+
rateLimiterStore.delete(this.key);
|
|
54
|
+
}
|
|
55
|
+
const current = rateLimiterStore.get(this.key);
|
|
56
|
+
if (current && current.count >= this.maxAttempts) {
|
|
57
|
+
// Rate limited - release the job back
|
|
58
|
+
const retryAfter = current.resetAt - now;
|
|
59
|
+
job.release(this.releaseAfterSeconds || retryAfter);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
// Increment the counter
|
|
63
|
+
if (current) {
|
|
64
|
+
current.count++;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
rateLimiterStore.set(this.key, {
|
|
68
|
+
count: 1,
|
|
69
|
+
resetAt: now + this.decaySeconds,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
await next();
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Set the number of seconds to release the job for
|
|
76
|
+
*/
|
|
77
|
+
releaseAfter(seconds) {
|
|
78
|
+
this.releaseAfterSeconds = seconds;
|
|
79
|
+
return this;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.RateLimited = RateLimited;
|
|
83
|
+
//# sourceMappingURL=RateLimited.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RateLimited.js","sourceRoot":"","sources":["../../../src/Queue/Middleware/RateLimited.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAKH,sCAAsC;AACtC,MAAM,gBAAgB,GAAoD,IAAI,GAAG,EAAE,CAAC;AAEpF,MAAa,WAAW;IAUV;IAKA;IAKA;IAnBZ;;OAEG;IACO,m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CAAC;IACf,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,OAAe;QAC1B,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA7DD,kCA6DC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ThrottlesExceptions Middleware
|
|
3
|
+
*
|
|
4
|
+
* When a job throws too many exceptions within a given time window,
|
|
5
|
+
* subsequent attempts are delayed to prevent rapid failure loops.
|
|
6
|
+
*
|
|
7
|
+
* Mirrors Laravel's Illuminate\Queue\Middleware\ThrottlesExceptions.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* class ProcessPodcast extends Job {
|
|
12
|
+
* middleware() {
|
|
13
|
+
* return [
|
|
14
|
+
* new ThrottlesExceptions(10, 5) // 10 exceptions per 5 minutes
|
|
15
|
+
* .backoff(5) // Wait 5 minutes before retrying
|
|
16
|
+
* ];
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
import type { Job } from '../Job';
|
|
22
|
+
import type { JobMiddleware } from './JobMiddleware';
|
|
23
|
+
export declare class ThrottlesExceptions implements JobMiddleware {
|
|
24
|
+
/**
|
|
25
|
+
* The maximum number of exceptions allowed
|
|
26
|
+
*/
|
|
27
|
+
protected maxExceptions: number;
|
|
28
|
+
/**
|
|
29
|
+
* The number of minutes in the decay window
|
|
30
|
+
*/
|
|
31
|
+
protected decayMinutes: number;
|
|
32
|
+
/**
|
|
33
|
+
* The number of minutes to back off for
|
|
34
|
+
*/
|
|
35
|
+
protected backoffMinutes: number;
|
|
36
|
+
/**
|
|
37
|
+
* The prefix for the throttle key
|
|
38
|
+
*/
|
|
39
|
+
protected keyPrefix: string;
|
|
40
|
+
/**
|
|
41
|
+
* Whether to retry the job or delete it when throttled
|
|
42
|
+
*/
|
|
43
|
+
protected shouldRetryOnThrottle: boolean;
|
|
44
|
+
constructor(
|
|
45
|
+
/**
|
|
46
|
+
* The maximum number of exceptions allowed
|
|
47
|
+
*/
|
|
48
|
+
maxExceptions?: number,
|
|
49
|
+
/**
|
|
50
|
+
* The number of minutes in the decay window
|
|
51
|
+
*/
|
|
52
|
+
decayMinutes?: number);
|
|
53
|
+
handle(job: Job, next: () => Promise<void>): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Get the throttle key for this job
|
|
56
|
+
*/
|
|
57
|
+
protected getKey(job: Job): string;
|
|
58
|
+
/**
|
|
59
|
+
* Set the number of minutes to back off for when throttled
|
|
60
|
+
*/
|
|
61
|
+
backoff(minutes: number): this;
|
|
62
|
+
/**
|
|
63
|
+
* Set a custom key prefix
|
|
64
|
+
*/
|
|
65
|
+
by(key: string): this;
|
|
66
|
+
/**
|
|
67
|
+
* Indicate the job should NOT be retried when throttled
|
|
68
|
+
*/
|
|
69
|
+
dontRetry(): this;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=ThrottlesExceptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThrottlesExceptions.d.ts","sourceRoot":"","sources":["../../../src/Queue/Middleware/ThrottlesExceptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKrD,qBAAa,mBAAoB,YAAW,aAAa;IAiBrD;;OAEG;IACH,SAAS,CAAC,aAAa,EAAE,MAAM;IAE/B;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,MAAM;IAxBhC;;OAEG;IACH,SAAS,CAAC,cAAc,EAAE,MAAM,CAAK;IAErC;;OAEG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM,CAAM;IAEjC;;OAEG;IACH,SAAS,CAAC,qBAAqB,EAAE,OAAO,CAAQ;;IAG9C;;OAEG;IACO,aAAa,GAAE,MAAW;IAEpC;;OAEG;IACO,YAAY,GAAE,MAAW;IAG/B,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAuChE;;OAEG;IACH,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM;IAKlC;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAK9B;;OAEG;IACH,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKrB;;OAEG;IACH,SAAS,IAAI,IAAI;CAIlB"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ThrottlesExceptions Middleware
|
|
4
|
+
*
|
|
5
|
+
* When a job throws too many exceptions within a given time window,
|
|
6
|
+
* subsequent attempts are delayed to prevent rapid failure loops.
|
|
7
|
+
*
|
|
8
|
+
* Mirrors Laravel's Illuminate\Queue\Middleware\ThrottlesExceptions.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* class ProcessPodcast extends Job {
|
|
13
|
+
* middleware() {
|
|
14
|
+
* return [
|
|
15
|
+
* new ThrottlesExceptions(10, 5) // 10 exceptions per 5 minutes
|
|
16
|
+
* .backoff(5) // Wait 5 minutes before retrying
|
|
17
|
+
* ];
|
|
18
|
+
* }
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.ThrottlesExceptions = void 0;
|
|
24
|
+
// In-memory exception tracking
|
|
25
|
+
const exceptionStore = new Map();
|
|
26
|
+
class ThrottlesExceptions {
|
|
27
|
+
maxExceptions;
|
|
28
|
+
decayMinutes;
|
|
29
|
+
/**
|
|
30
|
+
* The number of minutes to back off for
|
|
31
|
+
*/
|
|
32
|
+
backoffMinutes = 5;
|
|
33
|
+
/**
|
|
34
|
+
* The prefix for the throttle key
|
|
35
|
+
*/
|
|
36
|
+
keyPrefix = '';
|
|
37
|
+
/**
|
|
38
|
+
* Whether to retry the job or delete it when throttled
|
|
39
|
+
*/
|
|
40
|
+
shouldRetryOnThrottle = true;
|
|
41
|
+
constructor(
|
|
42
|
+
/**
|
|
43
|
+
* The maximum number of exceptions allowed
|
|
44
|
+
*/
|
|
45
|
+
maxExceptions = 10,
|
|
46
|
+
/**
|
|
47
|
+
* The number of minutes in the decay window
|
|
48
|
+
*/
|
|
49
|
+
decayMinutes = 10) {
|
|
50
|
+
this.maxExceptions = maxExceptions;
|
|
51
|
+
this.decayMinutes = decayMinutes;
|
|
52
|
+
}
|
|
53
|
+
async handle(job, next) {
|
|
54
|
+
const key = this.getKey(job);
|
|
55
|
+
const now = Math.floor(Date.now() / 1000);
|
|
56
|
+
// Clean up expired entries
|
|
57
|
+
const existing = exceptionStore.get(key);
|
|
58
|
+
if (existing && existing.resetAt <= now) {
|
|
59
|
+
exceptionStore.delete(key);
|
|
60
|
+
}
|
|
61
|
+
const current = exceptionStore.get(key);
|
|
62
|
+
// Check if throttled
|
|
63
|
+
if (current && current.count >= this.maxExceptions) {
|
|
64
|
+
if (this.shouldRetryOnThrottle) {
|
|
65
|
+
job.release(this.backoffMinutes * 60);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
job.delete();
|
|
69
|
+
}
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
await next();
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
// Record the exception
|
|
77
|
+
if (current) {
|
|
78
|
+
current.count++;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
exceptionStore.set(key, {
|
|
82
|
+
count: 1,
|
|
83
|
+
resetAt: now + (this.decayMinutes * 60),
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Get the throttle key for this job
|
|
91
|
+
*/
|
|
92
|
+
getKey(job) {
|
|
93
|
+
const prefix = this.keyPrefix || job.displayName();
|
|
94
|
+
return `throttle:${prefix}`;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Set the number of minutes to back off for when throttled
|
|
98
|
+
*/
|
|
99
|
+
backoff(minutes) {
|
|
100
|
+
this.backoffMinutes = minutes;
|
|
101
|
+
return this;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Set a custom key prefix
|
|
105
|
+
*/
|
|
106
|
+
by(key) {
|
|
107
|
+
this.keyPrefix = key;
|
|
108
|
+
return this;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Indicate the job should NOT be retried when throttled
|
|
112
|
+
*/
|
|
113
|
+
dontRetry() {
|
|
114
|
+
this.shouldRetryOnThrottle = false;
|
|
115
|
+
return this;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.ThrottlesExceptions = ThrottlesExceptions;
|
|
119
|
+
//# sourceMappingURL=ThrottlesExceptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThrottlesExceptions.js","sourceRoot":"","sources":["../../../src/Queue/Middleware/ThrottlesExceptions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAKH,+BAA+B;AAC/B,MAAM,cAAc,GAAoD,IAAI,GAAG,EAAE,CAAC;AAElF,MAAa,mBAAmB;IAoBlB;IAKA;IAxBZ;;OAEG;IACO,cAAc,GAAW,CAAC,CAAC;IAErC;;OAEG;IACO,SAAS,GAAW,EAAE,CAAC;IAEjC;;OAEG;IACO,qBAAqB,GAAY,IAAI,CAAC;IAEhD;IACE;;OAEG;IACO,gBAAwB,EAAE;IAEpC;;OAEG;IACO,eAAuB,EAAE;QALzB,kBAAa,GAAb,aAAa,CAAa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;QACd,CAAC;IACH,CAAC;IAED;;OAEG;IACO,MAAM,CAAC,GAAQ;QACvB,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;QACnD,OAAO,YAAY,MAAM,EAAE,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAAe;QACrB,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,EAAE,CAAC,GAAW;QACZ,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,SAAS;QACP,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlGD,kDAkGC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WithoutOverlapping Middleware
|
|
3
|
+
*
|
|
4
|
+
* Prevents a job from running if another instance with the same
|
|
5
|
+
* key is currently being processed.
|
|
6
|
+
*
|
|
7
|
+
* Mirrors Laravel's Illuminate\Queue\Middleware\WithoutOverlapping.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* class UpdateSearchIndex extends Job {
|
|
12
|
+
* middleware() {
|
|
13
|
+
* return [new WithoutOverlapping(this.productId)];
|
|
14
|
+
* }
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
import type { Job } from '../Job';
|
|
19
|
+
import type { JobMiddleware } from './JobMiddleware';
|
|
20
|
+
export declare class WithoutOverlapping implements JobMiddleware {
|
|
21
|
+
/**
|
|
22
|
+
* The lock key to prevent overlapping
|
|
23
|
+
*/
|
|
24
|
+
protected key: string | number;
|
|
25
|
+
/**
|
|
26
|
+
* The prefix for the lock key
|
|
27
|
+
*/
|
|
28
|
+
protected prefix: string;
|
|
29
|
+
/**
|
|
30
|
+
* The number of seconds to release the job for if locked
|
|
31
|
+
*/
|
|
32
|
+
protected releaseAfterSeconds: number;
|
|
33
|
+
/**
|
|
34
|
+
* The number of seconds the lock should be held
|
|
35
|
+
*/
|
|
36
|
+
protected lockExpiresAfter: number;
|
|
37
|
+
/**
|
|
38
|
+
* Whether to skip the job entirely if locked (vs releasing back to queue)
|
|
39
|
+
*/
|
|
40
|
+
protected shouldDontRelease: boolean;
|
|
41
|
+
constructor(
|
|
42
|
+
/**
|
|
43
|
+
* The lock key to prevent overlapping
|
|
44
|
+
*/
|
|
45
|
+
key: string | number,
|
|
46
|
+
/**
|
|
47
|
+
* The prefix for the lock key
|
|
48
|
+
*/
|
|
49
|
+
prefix?: string);
|
|
50
|
+
handle(job: Job, next: () => Promise<void>): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Set the number of seconds to release the job for if locked
|
|
53
|
+
*/
|
|
54
|
+
releaseAfter(seconds: number): this;
|
|
55
|
+
/**
|
|
56
|
+
* Set the lock expiration time in seconds
|
|
57
|
+
*/
|
|
58
|
+
expireAfter(seconds: number): this;
|
|
59
|
+
/**
|
|
60
|
+
* Indicate the job should be deleted if locked (instead of released)
|
|
61
|
+
*/
|
|
62
|
+
dontRelease(): this;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=WithoutOverlapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithoutOverlapping.d.ts","sourceRoot":"","sources":["../../../src/Queue/Middleware/WithoutOverlapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKrD,qBAAa,kBAAmB,YAAW,aAAa;IAiBpD;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAE9B;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM;IAxB1B;;OAEG;IACH,SAAS,CAAC,mBAAmB,EAAE,MAAM,CAAK;IAE1C;;OAEG;IACH,SAAS,CAAC,gBAAgB,EAAE,MAAM,CAAK;IAEvC;;OAEG;IACH,SAAS,CAAC,iBAAiB,EAAE,OAAO,CAAS;;IAG3C;;OAEG;IACO,GAAG,EAAE,MAAM,GAAG,MAAM;IAE9B;;OAEG;IACO,MAAM,GAAE,MAAmB;IAGjC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAmChE;;OAEG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKnC;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKlC;;OAEG;IACH,WAAW,IAAI,IAAI;CAIpB"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* WithoutOverlapping Middleware
|
|
4
|
+
*
|
|
5
|
+
* Prevents a job from running if another instance with the same
|
|
6
|
+
* key is currently being processed.
|
|
7
|
+
*
|
|
8
|
+
* Mirrors Laravel's Illuminate\Queue\Middleware\WithoutOverlapping.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* class UpdateSearchIndex extends Job {
|
|
13
|
+
* middleware() {
|
|
14
|
+
* return [new WithoutOverlapping(this.productId)];
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.WithoutOverlapping = void 0;
|
|
21
|
+
// Simple in-memory lock store
|
|
22
|
+
const lockStore = new Map();
|
|
23
|
+
class WithoutOverlapping {
|
|
24
|
+
key;
|
|
25
|
+
prefix;
|
|
26
|
+
/**
|
|
27
|
+
* The number of seconds to release the job for if locked
|
|
28
|
+
*/
|
|
29
|
+
releaseAfterSeconds = 0;
|
|
30
|
+
/**
|
|
31
|
+
* The number of seconds the lock should be held
|
|
32
|
+
*/
|
|
33
|
+
lockExpiresAfter = 0;
|
|
34
|
+
/**
|
|
35
|
+
* Whether to skip the job entirely if locked (vs releasing back to queue)
|
|
36
|
+
*/
|
|
37
|
+
shouldDontRelease = false;
|
|
38
|
+
constructor(
|
|
39
|
+
/**
|
|
40
|
+
* The lock key to prevent overlapping
|
|
41
|
+
*/
|
|
42
|
+
key,
|
|
43
|
+
/**
|
|
44
|
+
* The prefix for the lock key
|
|
45
|
+
*/
|
|
46
|
+
prefix = 'overlap:') {
|
|
47
|
+
this.key = key;
|
|
48
|
+
this.prefix = prefix;
|
|
49
|
+
}
|
|
50
|
+
async handle(job, next) {
|
|
51
|
+
const lockKey = `${this.prefix}${this.key}`;
|
|
52
|
+
const now = Math.floor(Date.now() / 1000);
|
|
53
|
+
// Clean up expired locks
|
|
54
|
+
const existing = lockStore.get(lockKey);
|
|
55
|
+
if (existing && existing.expiresAt > 0 && existing.expiresAt <= now) {
|
|
56
|
+
lockStore.delete(lockKey);
|
|
57
|
+
}
|
|
58
|
+
// Check if locked
|
|
59
|
+
if (lockStore.has(lockKey)) {
|
|
60
|
+
if (this.shouldDontRelease) {
|
|
61
|
+
// Skip the job entirely
|
|
62
|
+
job.delete();
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
// Release back onto the queue
|
|
66
|
+
job.release(this.releaseAfterSeconds || 5);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
// Acquire lock
|
|
70
|
+
const expiresAt = this.lockExpiresAfter > 0 ? now + this.lockExpiresAfter : 0;
|
|
71
|
+
lockStore.set(lockKey, { expiresAt });
|
|
72
|
+
try {
|
|
73
|
+
await next();
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
// Release lock
|
|
77
|
+
lockStore.delete(lockKey);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Set the number of seconds to release the job for if locked
|
|
82
|
+
*/
|
|
83
|
+
releaseAfter(seconds) {
|
|
84
|
+
this.releaseAfterSeconds = seconds;
|
|
85
|
+
return this;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Set the lock expiration time in seconds
|
|
89
|
+
*/
|
|
90
|
+
expireAfter(seconds) {
|
|
91
|
+
this.lockExpiresAfter = seconds;
|
|
92
|
+
return this;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Indicate the job should be deleted if locked (instead of released)
|
|
96
|
+
*/
|
|
97
|
+
dontRelease() {
|
|
98
|
+
this.shouldDontRelease = true;
|
|
99
|
+
return this;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.WithoutOverlapping = WithoutOverlapping;
|
|
103
|
+
//# sourceMappingURL=WithoutOverlapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithoutOverlapping.js","sourceRoot":"","sources":["../../../src/Queue/Middleware/WithoutOverlapping.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAKH,8BAA8B;AAC9B,MAAM,SAAS,GAAuC,IAAI,GAAG,EAAE,CAAC;AAEhE,MAAa,kBAAkB;IAoBjB;IAKA;IAxBZ;;OAEG;IACO,mBAAmB,GAAW,CAAC,CAAC;IAE1C;;OAEG;IACO,gBAAgB,GAAW,CAAC,CAAC;IAEvC;;OAEG;IACO,iBAAiB,GAAY,KAAK,CAAC;IAE7C;IACE;;OAEG;IACO,GAAoB;IAE9B;;OAEG;IACO,SAAiB,UAAU;QAL3B,QAAG,GAAH,GAAG,CAAiB;QAKpB,WAAM,GAAN,MAAM,CAAqB;IACpC,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,GAAQ,EAAE,IAAyB;QAC9C,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,MAAM,GAAG,I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