@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,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* DatabaseFailedJobProvider
|
|
4
|
+
*
|
|
5
|
+
* Stores failed jobs in a database table.
|
|
6
|
+
* Mirrors Laravel's Illuminate\Queue\Failed\DatabaseUuidFailedJobProvider.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.DatabaseFailedJobProvider = void 0;
|
|
10
|
+
const crypto_1 = require("crypto");
|
|
11
|
+
class DatabaseFailedJobProvider {
|
|
12
|
+
app;
|
|
13
|
+
table;
|
|
14
|
+
databaseConnection;
|
|
15
|
+
constructor(app, config) {
|
|
16
|
+
this.app = app;
|
|
17
|
+
this.table = config.table || 'failed_jobs';
|
|
18
|
+
this.databaseConnection = config.database;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get the database connection
|
|
22
|
+
*/
|
|
23
|
+
getConnection() {
|
|
24
|
+
const db = this.app.make('db');
|
|
25
|
+
return db.connection(this.databaseConnection);
|
|
26
|
+
}
|
|
27
|
+
async log(connection, queue, payload, exception) {
|
|
28
|
+
const uuid = (0, crypto_1.randomUUID)();
|
|
29
|
+
const conn = this.getConnection();
|
|
30
|
+
await conn.table(this.table).insert({
|
|
31
|
+
uuid,
|
|
32
|
+
connection,
|
|
33
|
+
queue,
|
|
34
|
+
payload,
|
|
35
|
+
exception: this.formatException(exception),
|
|
36
|
+
failed_at: new Date().toISOString(),
|
|
37
|
+
});
|
|
38
|
+
return uuid;
|
|
39
|
+
}
|
|
40
|
+
async all() {
|
|
41
|
+
const conn = this.getConnection();
|
|
42
|
+
const results = await conn.table(this.table)
|
|
43
|
+
.orderBy('id', 'desc')
|
|
44
|
+
.get();
|
|
45
|
+
return results;
|
|
46
|
+
}
|
|
47
|
+
async find(id) {
|
|
48
|
+
const conn = this.getConnection();
|
|
49
|
+
const result = await conn.table(this.table)
|
|
50
|
+
.where('id', '=', id)
|
|
51
|
+
.orWhere('uuid', '=', String(id))
|
|
52
|
+
.first();
|
|
53
|
+
return result || null;
|
|
54
|
+
}
|
|
55
|
+
async forget(id) {
|
|
56
|
+
const conn = this.getConnection();
|
|
57
|
+
const deleted = await conn.table(this.table)
|
|
58
|
+
.where('id', '=', id)
|
|
59
|
+
.orWhere('uuid', '=', String(id))
|
|
60
|
+
.delete();
|
|
61
|
+
return deleted > 0;
|
|
62
|
+
}
|
|
63
|
+
async flush(hours) {
|
|
64
|
+
const conn = this.getConnection();
|
|
65
|
+
if (hours !== undefined && hours > 0) {
|
|
66
|
+
const cutoff = new Date(Date.now() - hours * 60 * 60 * 1000).toISOString();
|
|
67
|
+
await conn.table(this.table)
|
|
68
|
+
.where('failed_at', '<=', cutoff)
|
|
69
|
+
.delete();
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
await conn.table(this.table).delete();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
async count(connection, queue) {
|
|
76
|
+
const conn = this.getConnection();
|
|
77
|
+
let query = conn.table(this.table);
|
|
78
|
+
if (connection) {
|
|
79
|
+
query = query.where('connection', '=', connection);
|
|
80
|
+
}
|
|
81
|
+
if (queue) {
|
|
82
|
+
query = query.where('queue', '=', queue);
|
|
83
|
+
}
|
|
84
|
+
return Number(await query.count()) || 0;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Format an exception for storage
|
|
88
|
+
*/
|
|
89
|
+
formatException(exception) {
|
|
90
|
+
const lines = [
|
|
91
|
+
`${exception.constructor.name}: ${exception.message}`,
|
|
92
|
+
];
|
|
93
|
+
if (exception.stack) {
|
|
94
|
+
lines.push('', exception.stack);
|
|
95
|
+
}
|
|
96
|
+
return lines.join('\n');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.DatabaseFailedJobProvider = DatabaseFailedJobProvider;
|
|
100
|
+
//# sourceMappingURL=DatabaseFailedJobProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabaseFailedJobProvider.js","sourceRoot":"","sources":["../../../src/Queue/Failed/DatabaseFailedJobProvider.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mCAAoC;AAMpC,MAAa,yBAAyB;IAKxB;IAJF,KAAK,CAAS;IACd,kBAAkB,CAAU;IAEtC,YACY,GAAgB,EAC1B,MAA6C;QADnC,QAAG,GAAH,GAAG,CAAa;QAG1B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,aAAa,CAAC;QAC3C,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC5C,CAAC;IAED;;OAEG;IACO,aAAa;QACrB,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAkB,IAAI,CAAC,CAAC;QAChD,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAChD,CAA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QAED,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACO,eAAe,CAAC,SAAgB;QACxC,MAAM,KAAK,GAAa;YACtB,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,KAAK,SAAS,CAAC,OAAO,EAAE;SACtD,CAAC;QAEF,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;YACpB,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF;AAhHD,8DAgHC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FailedJobProvider Contract
|
|
3
|
+
*
|
|
4
|
+
* Defines the interface for failed job storage implementations.
|
|
5
|
+
* Mirrors Laravel's Illuminate\Queue\Failed\FailedJobProviderInterface.
|
|
6
|
+
*/
|
|
7
|
+
export interface FailedJobRecord {
|
|
8
|
+
id: number | string;
|
|
9
|
+
uuid: string;
|
|
10
|
+
connection: string;
|
|
11
|
+
queue: string;
|
|
12
|
+
payload: string;
|
|
13
|
+
exception: string;
|
|
14
|
+
failed_at: string;
|
|
15
|
+
}
|
|
16
|
+
export interface FailedJobProvider {
|
|
17
|
+
/**
|
|
18
|
+
* Log a failed job
|
|
19
|
+
*/
|
|
20
|
+
log(connection: string, queue: string, payload: string, exception: Error): Promise<string | number>;
|
|
21
|
+
/**
|
|
22
|
+
* Get a list of all failed jobs
|
|
23
|
+
*/
|
|
24
|
+
all(): Promise<FailedJobRecord[]>;
|
|
25
|
+
/**
|
|
26
|
+
* Get a single failed job by ID
|
|
27
|
+
*/
|
|
28
|
+
find(id: string | number): Promise<FailedJobRecord | null>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a single failed job
|
|
31
|
+
*/
|
|
32
|
+
forget(id: string | number): Promise<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* Delete all failed jobs
|
|
35
|
+
*/
|
|
36
|
+
flush(hours?: number): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Count all failed jobs
|
|
39
|
+
*/
|
|
40
|
+
count(connection?: string, queue?: string): Promise<number>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=FailedJobProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FailedJobProvider.d.ts","sourceRoot":"","sources":["../../../src/Queue/Failed/FailedJobProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,GAAG,CACD,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,KAAK,GACf,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAE5B;;OAEG;IACH,GAAG,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IAElC;;OAEG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;IAE3D;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE9C;;OAEG;IACH,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC;;OAEG;IACH,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* FailedJobProvider Contract
|
|
4
|
+
*
|
|
5
|
+
* Defines the interface for failed job storage implementations.
|
|
6
|
+
* Mirrors Laravel's Illuminate\Queue\Failed\FailedJobProviderInterface.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
//# sourceMappingURL=FailedJobProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FailedJobProvider.js","sourceRoot":"","sources":["../../../src/Queue/Failed/FailedJobProvider.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Job Base Class
|
|
3
|
+
*
|
|
4
|
+
* Base class for all queueable jobs in the application.
|
|
5
|
+
* Mirrors Laravel's Job with Dispatchable, InteractsWithQueue,
|
|
6
|
+
* Queueable, and SerializesModels traits.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* class ProcessPodcast extends Job {
|
|
11
|
+
* public tries = 5;
|
|
12
|
+
* public timeout = 120;
|
|
13
|
+
* public backoff = [10, 30, 60];
|
|
14
|
+
*
|
|
15
|
+
* constructor(public podcastId: number) {
|
|
16
|
+
* super();
|
|
17
|
+
* }
|
|
18
|
+
*
|
|
19
|
+
* async handle(): Promise<void> {
|
|
20
|
+
* // Process podcast...
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* async failed(error: Error): Promise<void> {
|
|
24
|
+
* console.error('Failed:', error);
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* // Dispatch
|
|
29
|
+
* await ProcessPodcast.dispatch(podcastId);
|
|
30
|
+
* await ProcessPodcast.dispatch(podcastId).onQueue('high').delay(60);
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
import type { QueueableJob } from './Contracts/QueueableJob';
|
|
34
|
+
import type { JobMiddleware } from './Middleware/JobMiddleware';
|
|
35
|
+
export declare abstract class Job implements QueueableJob {
|
|
36
|
+
/**
|
|
37
|
+
* The unique identifier for the job
|
|
38
|
+
*/
|
|
39
|
+
uuid: string;
|
|
40
|
+
/**
|
|
41
|
+
* The name of the connection the job should be sent to
|
|
42
|
+
*/
|
|
43
|
+
connection?: string;
|
|
44
|
+
/**
|
|
45
|
+
* The name of the queue the job should be sent to
|
|
46
|
+
*/
|
|
47
|
+
queue?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The number of seconds before the job should be processed
|
|
50
|
+
*/
|
|
51
|
+
delay?: number | Date;
|
|
52
|
+
/**
|
|
53
|
+
* The number of times the job may be attempted
|
|
54
|
+
*/
|
|
55
|
+
tries?: number;
|
|
56
|
+
/**
|
|
57
|
+
* The maximum number of unhandled exceptions to allow before failing
|
|
58
|
+
*/
|
|
59
|
+
maxExceptions?: number;
|
|
60
|
+
/**
|
|
61
|
+
* The number of seconds the job can run before timing out
|
|
62
|
+
*/
|
|
63
|
+
timeout?: number;
|
|
64
|
+
/**
|
|
65
|
+
* The number of seconds to wait before retrying the job
|
|
66
|
+
*/
|
|
67
|
+
backoff?: number | number[];
|
|
68
|
+
/**
|
|
69
|
+
* The timestamp after which the job should no longer be retried
|
|
70
|
+
*/
|
|
71
|
+
retryUntil?: Date;
|
|
72
|
+
/**
|
|
73
|
+
* Indicate if the job should be marked as failed on timeout
|
|
74
|
+
*/
|
|
75
|
+
failOnTimeout?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Indicate if the job should be dispatched after all database transactions have committed
|
|
78
|
+
*/
|
|
79
|
+
afterCommit?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Internal: the job ID from the queue driver
|
|
82
|
+
*/
|
|
83
|
+
jobId?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Internal: the number of times the job has been attempted
|
|
86
|
+
*/
|
|
87
|
+
attempts: number;
|
|
88
|
+
/**
|
|
89
|
+
* Internal: whether the job has been deleted
|
|
90
|
+
*/
|
|
91
|
+
protected _deleted: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Internal: whether the job has been released
|
|
94
|
+
*/
|
|
95
|
+
protected _released: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Internal: the release delay
|
|
98
|
+
*/
|
|
99
|
+
protected _releaseDelay: number;
|
|
100
|
+
/**
|
|
101
|
+
* Internal: whether the job has been marked as failed
|
|
102
|
+
*/
|
|
103
|
+
protected _failed: boolean;
|
|
104
|
+
constructor();
|
|
105
|
+
/**
|
|
106
|
+
* Execute the job
|
|
107
|
+
*/
|
|
108
|
+
abstract handle(...args: any[]): Promise<void> | void;
|
|
109
|
+
/**
|
|
110
|
+
* Handle a job failure
|
|
111
|
+
*/
|
|
112
|
+
failed?(error: Error): Promise<void> | void;
|
|
113
|
+
/**
|
|
114
|
+
* Get the middleware the job should pass through
|
|
115
|
+
*/
|
|
116
|
+
middleware?(): JobMiddleware[];
|
|
117
|
+
/**
|
|
118
|
+
* Get the display name of the job
|
|
119
|
+
*/
|
|
120
|
+
displayName(): string;
|
|
121
|
+
/**
|
|
122
|
+
* Delete the job from the queue
|
|
123
|
+
*/
|
|
124
|
+
delete(): void;
|
|
125
|
+
/**
|
|
126
|
+
* Release the job back onto the queue after a delay
|
|
127
|
+
*/
|
|
128
|
+
release(delay?: number): void;
|
|
129
|
+
/**
|
|
130
|
+
* Mark the job as failed
|
|
131
|
+
*/
|
|
132
|
+
fail(error?: Error): void;
|
|
133
|
+
/**
|
|
134
|
+
* Determine if the job has been deleted
|
|
135
|
+
*/
|
|
136
|
+
isDeleted(): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Determine if the job has been released
|
|
139
|
+
*/
|
|
140
|
+
isReleased(): boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Get the release delay
|
|
143
|
+
*/
|
|
144
|
+
getReleaseDelay(): number;
|
|
145
|
+
/**
|
|
146
|
+
* Determine if the job has been marked as failed
|
|
147
|
+
*/
|
|
148
|
+
hasFailed(): boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Determine if the job has exceeded the maximum number of attempts
|
|
151
|
+
*/
|
|
152
|
+
hasExceededMaxAttempts(): boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Get the number of seconds to wait before retrying the job
|
|
155
|
+
*/
|
|
156
|
+
getBackoffDelay(attempt: number): number;
|
|
157
|
+
/**
|
|
158
|
+
* Serialize the job for queue storage
|
|
159
|
+
*/
|
|
160
|
+
toJSON(): Record<string, any>;
|
|
161
|
+
/**
|
|
162
|
+
* Serialize a value for JSON storage
|
|
163
|
+
*/
|
|
164
|
+
protected serializeValue(value: any): any;
|
|
165
|
+
/**
|
|
166
|
+
* Restore a job from serialized data
|
|
167
|
+
*/
|
|
168
|
+
static fromJSON<T extends Job>(this: typeof Job & (new (...args: any[]) => T), data: Record<string, any>): T;
|
|
169
|
+
/**
|
|
170
|
+
* Deserialize a value from JSON
|
|
171
|
+
*/
|
|
172
|
+
protected static deserializeValue(value: any): any;
|
|
173
|
+
/**
|
|
174
|
+
* Static dispatch methods (applied by applyJobDispatchable)
|
|
175
|
+
* These are typed via the JobClass type helper below
|
|
176
|
+
*/
|
|
177
|
+
static dispatch: (...args: any[]) => any;
|
|
178
|
+
static dispatchSync: (...args: any[]) => Promise<void>;
|
|
179
|
+
static dispatchIf: (condition: boolean | (() => boolean), ...args: any[]) => any;
|
|
180
|
+
static dispatchUnless: (condition: boolean | (() => boolean), ...args: any[]) => any;
|
|
181
|
+
static dispatchAfterResponse: (...args: any[]) => void;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Type helper for Job classes with static dispatch methods
|
|
185
|
+
*/
|
|
186
|
+
export type JobClass<T extends Job = Job> = typeof Job & {
|
|
187
|
+
new (...args: any[]): T;
|
|
188
|
+
dispatch(...args: any[]): import('./PendingDispatch').PendingDispatch;
|
|
189
|
+
dispatchSync(...args: any[]): Promise<void>;
|
|
190
|
+
dispatchIf(condition: boolean | (() => boolean), ...args: any[]): import('./PendingDispatch').PendingDispatch | null;
|
|
191
|
+
dispatchUnless(condition: boolean | (() => boolean), ...args: any[]): import('./PendingDispatch').PendingDispatch | null;
|
|
192
|
+
dispatchAfterResponse(...args: any[]): void;
|
|
193
|
+
};
|
|
194
|
+
//# sourceMappingURL=Job.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Job.d.ts","sourceRoot":"","sources":["../../src/Queue/Job.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,8BAAsB,GAAI,YAAW,YAAY;IAC/C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACI,UAAU,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACI,KAAK,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACI,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACI,KAAK,CAAC,EAAE,MAAM,CAAK;IAE1B;;OAEG;IACI,aAAa,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACI,OAAO,CAAC,EAAE,MAAM,CAAM;IAE7B;;OAEG;IACI,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEnC;;OAEG;IACI,UAAU,CAAC,EAAE,IAAI,CAAC;IAEzB;;OAEG;IACI,aAAa,CAAC,EAAE,OAAO,CAAS;IAEvC;;OAEG;IACI,WAAW,CAAC,EAAE,OAAO,CAAS;IAErC;;OAEG;IACI,KAAK,CAAC,EAA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,OAAO,mBAAmB,EAAE,eAAe,GAAG,IAAI,CAAC;IACrH,cAAc,CAAC,SAAS,EAAE,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,mBAAmB,EAAE,eAAe,GAAG,IAAI,CAAC;IACzH,qBAAqB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;CAC7C,CAAC"}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Job Base Class
|
|
4
|
+
*
|
|
5
|
+
* Base class for all queueable jobs in the application.
|
|
6
|
+
* Mirrors Laravel's Job with Dispatchable, InteractsWithQueue,
|
|
7
|
+
* Queueable, and SerializesModels traits.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* class ProcessPodcast extends Job {
|
|
12
|
+
* public tries = 5;
|
|
13
|
+
* public timeout = 120;
|
|
14
|
+
* public backoff = [10, 30, 60];
|
|
15
|
+
*
|
|
16
|
+
* constructor(public podcastId: number) {
|
|
17
|
+
* super();
|
|
18
|
+
* }
|
|
19
|
+
*
|
|
20
|
+
* async handle(): Promise<void> {
|
|
21
|
+
* // Process podcast...
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* async failed(error: Error): Promise<void> {
|
|
25
|
+
* console.error('Failed:', error);
|
|
26
|
+
* }
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* // Dispatch
|
|
30
|
+
* await ProcessPodcast.dispatch(podcastId);
|
|
31
|
+
* await ProcessPodcast.dispatch(podcastId).onQueue('high').delay(60);
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.Job = void 0;
|
|
36
|
+
const crypto_1 = require("crypto");
|
|
37
|
+
class Job {
|
|
38
|
+
/**
|
|
39
|
+
* The unique identifier for the job
|
|
40
|
+
*/
|
|
41
|
+
uuid;
|
|
42
|
+
/**
|
|
43
|
+
* The name of the connection the job should be sent to
|
|
44
|
+
*/
|
|
45
|
+
connection;
|
|
46
|
+
/**
|
|
47
|
+
* The name of the queue the job should be sent to
|
|
48
|
+
*/
|
|
49
|
+
queue;
|
|
50
|
+
/**
|
|
51
|
+
* The number of seconds before the job should be processed
|
|
52
|
+
*/
|
|
53
|
+
delay;
|
|
54
|
+
/**
|
|
55
|
+
* The number of times the job may be attempted
|
|
56
|
+
*/
|
|
57
|
+
tries = 1;
|
|
58
|
+
/**
|
|
59
|
+
* The maximum number of unhandled exceptions to allow before failing
|
|
60
|
+
*/
|
|
61
|
+
maxExceptions;
|
|
62
|
+
/**
|
|
63
|
+
* The number of seconds the job can run before timing out
|
|
64
|
+
*/
|
|
65
|
+
timeout = 60;
|
|
66
|
+
/**
|
|
67
|
+
* The number of seconds to wait before retrying the job
|
|
68
|
+
*/
|
|
69
|
+
backoff;
|
|
70
|
+
/**
|
|
71
|
+
* The timestamp after which the job should no longer be retried
|
|
72
|
+
*/
|
|
73
|
+
retryUntil;
|
|
74
|
+
/**
|
|
75
|
+
* Indicate if the job should be marked as failed on timeout
|
|
76
|
+
*/
|
|
77
|
+
failOnTimeout = false;
|
|
78
|
+
/**
|
|
79
|
+
* Indicate if the job should be dispatched after all database transactions have committed
|
|
80
|
+
*/
|
|
81
|
+
afterCommit = false;
|
|
82
|
+
/**
|
|
83
|
+
* Internal: the job ID from the queue driver
|
|
84
|
+
*/
|
|
85
|
+
jobId;
|
|
86
|
+
/**
|
|
87
|
+
* Internal: the number of times the job has been attempted
|
|
88
|
+
*/
|
|
89
|
+
attempts = 0;
|
|
90
|
+
/**
|
|
91
|
+
* Internal: whether the job has been deleted
|
|
92
|
+
*/
|
|
93
|
+
_deleted = false;
|
|
94
|
+
/**
|
|
95
|
+
* Internal: whether the job has been released
|
|
96
|
+
*/
|
|
97
|
+
_released = false;
|
|
98
|
+
/**
|
|
99
|
+
* Internal: the release delay
|
|
100
|
+
*/
|
|
101
|
+
_releaseDelay = 0;
|
|
102
|
+
/**
|
|
103
|
+
* Internal: whether the job has been marked as failed
|
|
104
|
+
*/
|
|
105
|
+
_failed = false;
|
|
106
|
+
constructor() {
|
|
107
|
+
this.uuid = (0, crypto_1.randomUUID)();
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Get the display name of the job
|
|
111
|
+
*/
|
|
112
|
+
displayName() {
|
|
113
|
+
return this.constructor.name;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Delete the job from the queue
|
|
117
|
+
*/
|
|
118
|
+
delete() {
|
|
119
|
+
this._deleted = true;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Release the job back onto the queue after a delay
|
|
123
|
+
*/
|
|
124
|
+
release(delay = 0) {
|
|
125
|
+
this._released = true;
|
|
126
|
+
this._releaseDelay = delay;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Mark the job as failed
|
|
130
|
+
*/
|
|
131
|
+
fail(error) {
|
|
132
|
+
this._failed = true;
|
|
133
|
+
if (error && this.failed) {
|
|
134
|
+
this.failed(error);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Determine if the job has been deleted
|
|
139
|
+
*/
|
|
140
|
+
isDeleted() {
|
|
141
|
+
return this._deleted;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Determine if the job has been released
|
|
145
|
+
*/
|
|
146
|
+
isReleased() {
|
|
147
|
+
return this._released;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Get the release delay
|
|
151
|
+
*/
|
|
152
|
+
getReleaseDelay() {
|
|
153
|
+
return this._releaseDelay;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Determine if the job has been marked as failed
|
|
157
|
+
*/
|
|
158
|
+
hasFailed() {
|
|
159
|
+
return this._failed;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Determine if the job has exceeded the maximum number of attempts
|
|
163
|
+
*/
|
|
164
|
+
hasExceededMaxAttempts() {
|
|
165
|
+
if (this.tries && this.attempts >= this.tries) {
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
if (this.retryUntil && new Date() >= this.retryUntil) {
|
|
169
|
+
return true;
|
|
170
|
+
}
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Get the number of seconds to wait before retrying the job
|
|
175
|
+
*/
|
|
176
|
+
getBackoffDelay(attempt) {
|
|
177
|
+
const backoff = this.backoff;
|
|
178
|
+
if (backoff === undefined || backoff === null) {
|
|
179
|
+
return 0;
|
|
180
|
+
}
|
|
181
|
+
if (typeof backoff === 'number') {
|
|
182
|
+
return backoff;
|
|
183
|
+
}
|
|
184
|
+
if (Array.isArray(backoff)) {
|
|
185
|
+
return backoff[Math.min(attempt - 1, backoff.length - 1)] ?? 0;
|
|
186
|
+
}
|
|
187
|
+
return 0;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Serialize the job for queue storage
|
|
191
|
+
*/
|
|
192
|
+
toJSON() {
|
|
193
|
+
const data = {
|
|
194
|
+
_class: this.constructor.name,
|
|
195
|
+
};
|
|
196
|
+
const properties = Object.getOwnPropertyNames(this);
|
|
197
|
+
for (const prop of properties) {
|
|
198
|
+
// Skip internal properties
|
|
199
|
+
if (prop.startsWith('_'))
|
|
200
|
+
continue;
|
|
201
|
+
const value = this[prop];
|
|
202
|
+
if (value !== undefined) {
|
|
203
|
+
data[prop] = this.serializeValue(value);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return data;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Serialize a value for JSON storage
|
|
210
|
+
*/
|
|
211
|
+
serializeValue(value) {
|
|
212
|
+
if (value === null || value === undefined) {
|
|
213
|
+
return value;
|
|
214
|
+
}
|
|
215
|
+
if (value instanceof Date) {
|
|
216
|
+
return { _type: 'Date', value: value.toISOString() };
|
|
217
|
+
}
|
|
218
|
+
if (typeof value === 'object' && typeof value.toJSON === 'function') {
|
|
219
|
+
return value.toJSON();
|
|
220
|
+
}
|
|
221
|
+
if (Array.isArray(value)) {
|
|
222
|
+
return value.map((item) => this.serializeValue(item));
|
|
223
|
+
}
|
|
224
|
+
if (typeof value === 'object') {
|
|
225
|
+
const serialized = {};
|
|
226
|
+
for (const [key, val] of Object.entries(value)) {
|
|
227
|
+
serialized[key] = this.serializeValue(val);
|
|
228
|
+
}
|
|
229
|
+
return serialized;
|
|
230
|
+
}
|
|
231
|
+
return value;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Restore a job from serialized data
|
|
235
|
+
*/
|
|
236
|
+
static fromJSON(data) {
|
|
237
|
+
const instance = Object.create(this.prototype);
|
|
238
|
+
for (const [key, value] of Object.entries(data)) {
|
|
239
|
+
if (key === '_class')
|
|
240
|
+
continue;
|
|
241
|
+
instance[key] = Job.deserializeValue(value);
|
|
242
|
+
}
|
|
243
|
+
return instance;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Deserialize a value from JSON
|
|
247
|
+
*/
|
|
248
|
+
static deserializeValue(value) {
|
|
249
|
+
if (value === null || value === undefined) {
|
|
250
|
+
return value;
|
|
251
|
+
}
|
|
252
|
+
if (typeof value === 'object' && value._type) {
|
|
253
|
+
switch (value._type) {
|
|
254
|
+
case 'Date':
|
|
255
|
+
return new Date(value.value);
|
|
256
|
+
default:
|
|
257
|
+
return value;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
if (Array.isArray(value)) {
|
|
261
|
+
return value.map((item) => this.deserializeValue(item));
|
|
262
|
+
}
|
|
263
|
+
if (typeof value === 'object') {
|
|
264
|
+
const deserialized = {};
|
|
265
|
+
for (const [key, val] of Object.entries(value)) {
|
|
266
|
+
deserialized[key] = this.deserializeValue(val);
|
|
267
|
+
}
|
|
268
|
+
return deserialized;
|
|
269
|
+
}
|
|
270
|
+
return value;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Static dispatch methods (applied by applyJobDispatchable)
|
|
274
|
+
* These are typed via the JobClass type helper below
|
|
275
|
+
*/
|
|
276
|
+
static dispatch;
|
|
277
|
+
static dispatchSync;
|
|
278
|
+
static dispatchIf;
|
|
279
|
+
static dispatchUnless;
|
|
280
|
+
static dispatchAfterResponse;
|
|
281
|
+
}
|
|
282
|
+
exports.Job = Job;
|
|
283
|
+
// Apply dispatch methods
|
|
284
|
+
const Dispatchable_1 = require("./Concerns/Dispatchable");
|
|
285
|
+
(0, Dispatchable_1.applyJobDispatchable)(Job);
|
|
286
|
+
//# sourceMappingURL=Job.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Job.js","sourceRoot":"","sources":["../../src/Queue/Job.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;AAEH,mCAAoC;AAIpC,MAAsB,GAAG;IACvB;;OAEG;IACI,IAAI,CAAS;IAEpB;;OAEG;IACI,UAAU,CAAU;IAE3B;;OAEG;IACI,KAAK,CAAU;IAEtB;;OAEG;IACI,KAAK,CAAiB;IAE7B;;OAEG;IACI,KAAK,GAAY,CAAC,CAAC;IAE1B;;OAEG;IACI,aAAa,CAAU;IAE9B;;OAEG;IACI,OAAO,GAAY,EAAE,CAAC;IAE7B;;OAEG;IACI,OAAO,CAAqB;IAEnC;;OAEG;IACI,UAAU,CAAQ;IAEzB;;OAEG;IACI,aAAa,GAAa,KAAK,CAAC;IAEvC;;OAEG;IACI,WAAW,GAAa,KAAK,CAAC;IAErC;;OAEG;IACI,KAAK,CAAU;IAEtB;;OAEG;IACI,QAAQ,GAAW,CAAC,CAAC;IAE5B;;OAEG;IACO,QAAQ,GAAY,KAAK,CAAC;IAEpC;;OAEG;IACO,SAAS,GAAY,KAAK,CAAC;IAErC;;OAEG;IACO,aAAa,GAAW,CA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