@orchestr-sh/orchestr 1.7.3 → 1.8.0
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/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/Events/Dispatcher.d.ts.map +1 -1
- package/dist/Events/Dispatcher.js +10 -1
- package/dist/Events/Dispatcher.js.map +1 -1
- 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/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 +2 -0
- package/dist/Facades/index.d.ts.map +1 -1
- package/dist/Facades/index.js +5 -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 +50 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +92 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* JobExceptionOccurred Event
|
|
4
|
+
*
|
|
5
|
+
* Dispatched when a job throws an exception (but may still be retried).
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.JobExceptionOccurred = void 0;
|
|
9
|
+
class JobExceptionOccurred {
|
|
10
|
+
connectionName;
|
|
11
|
+
job;
|
|
12
|
+
exception;
|
|
13
|
+
constructor(connectionName, job, exception) {
|
|
14
|
+
this.connectionName = connectionName;
|
|
15
|
+
this.job = job;
|
|
16
|
+
this.exception = exception;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.JobExceptionOccurred = JobExceptionOccurred;
|
|
20
|
+
//# sourceMappingURL=JobExceptionOccurred.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobExceptionOccurred.js","sourceRoot":"","sources":["../../../src/Queue/Events/JobExceptionOccurred.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH,MAAa,oBAAoB;IAEb;IACA;IACA;IAHlB,YACkB,cAAsB,EACtB,GAAQ,EACR,SAAgB;QAFhB,mBAAc,GAAd,cAAc,CAAQ;QACtB,QAAG,GAAH,GAAG,CAAK;QACR,cAAS,GAAT,SAAS,CAAO;IAC/B,CAAC;CACL;AAND,oDAMC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JobFailed Event
|
|
3
|
+
*
|
|
4
|
+
* Dispatched when a job has failed and exceeded its maximum attempts.
|
|
5
|
+
*/
|
|
6
|
+
import type { Job } from '../Job';
|
|
7
|
+
export declare class JobFailed {
|
|
8
|
+
readonly connectionName: string;
|
|
9
|
+
readonly job: Job;
|
|
10
|
+
readonly exception: Error;
|
|
11
|
+
constructor(connectionName: string, job: Job, exception: Error);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=JobFailed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobFailed.d.ts","sourceRoot":"","sources":["../../../src/Queue/Events/JobFailed.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAElC,qBAAa,SAAS;aAEF,cAAc,EAAE,MAAM;aACtB,GAAG,EAAE,GAAG;aACR,SAAS,EAAE,KAAK;gBAFhB,cAAc,EAAE,MAAM,EACtB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,KAAK;CAEnC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* JobFailed Event
|
|
4
|
+
*
|
|
5
|
+
* Dispatched when a job has failed and exceeded its maximum attempts.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.JobFailed = void 0;
|
|
9
|
+
class JobFailed {
|
|
10
|
+
connectionName;
|
|
11
|
+
job;
|
|
12
|
+
exception;
|
|
13
|
+
constructor(connectionName, job, exception) {
|
|
14
|
+
this.connectionName = connectionName;
|
|
15
|
+
this.job = job;
|
|
16
|
+
this.exception = exception;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.JobFailed = JobFailed;
|
|
20
|
+
//# sourceMappingURL=JobFailed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobFailed.js","sourceRoot":"","sources":["../../../src/Queue/Events/JobFailed.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH,MAAa,SAAS;IAEF;IACA;IACA;IAHlB,YACkB,cAAsB,EACtB,GAAQ,EACR,SAAgB;QAFhB,mBAAc,GAAd,cAAc,CAAQ;QACtB,QAAG,GAAH,GAAG,CAAK;QACR,cAAS,GAAT,SAAS,CAAO;IAC/B,CAAC;CACL;AAND,8BAMC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JobProcessed Event
|
|
3
|
+
*
|
|
4
|
+
* Dispatched after a job has been successfully processed.
|
|
5
|
+
*/
|
|
6
|
+
import type { Job } from '../Job';
|
|
7
|
+
export declare class JobProcessed {
|
|
8
|
+
readonly connectionName: string;
|
|
9
|
+
readonly job: Job;
|
|
10
|
+
constructor(connectionName: string, job: Job);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=JobProcessed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobProcessed.d.ts","sourceRoot":"","sources":["../../../src/Queue/Events/JobProcessed.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAElC,qBAAa,YAAY;aAEL,cAAc,EAAE,MAAM;aACtB,GAAG,EAAE,GAAG;gBADR,cAAc,EAAE,MAAM,EACtB,GAAG,EAAE,GAAG;CAE3B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* JobProcessed Event
|
|
4
|
+
*
|
|
5
|
+
* Dispatched after a job has been successfully processed.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.JobProcessed = void 0;
|
|
9
|
+
class JobProcessed {
|
|
10
|
+
connectionName;
|
|
11
|
+
job;
|
|
12
|
+
constructor(connectionName, job) {
|
|
13
|
+
this.connectionName = connectionName;
|
|
14
|
+
this.job = job;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.JobProcessed = JobProcessed;
|
|
18
|
+
//# sourceMappingURL=JobProcessed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobProcessed.js","sourceRoot":"","sources":["../../../src/Queue/Events/JobProcessed.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH,MAAa,YAAY;IAEL;IACA;IAFlB,YACkB,cAAsB,EACtB,GAAQ;QADR,mBAAc,GAAd,cAAc,CAAQ;QACtB,QAAG,GAAH,GAAG,CAAK;IACvB,CAAC;CACL;AALD,oCAKC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JobProcessing Event
|
|
3
|
+
*
|
|
4
|
+
* Dispatched before a job is processed by the worker.
|
|
5
|
+
*/
|
|
6
|
+
import type { Job } from '../Job';
|
|
7
|
+
export declare class JobProcessing {
|
|
8
|
+
readonly connectionName: string;
|
|
9
|
+
readonly job: Job;
|
|
10
|
+
constructor(connectionName: string, job: Job);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=JobProcessing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobProcessing.d.ts","sourceRoot":"","sources":["../../../src/Queue/Events/JobProcessing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAElC,qBAAa,aAAa;aAEN,cAAc,EAAE,MAAM;aACtB,GAAG,EAAE,GAAG;gBADR,cAAc,EAAE,MAAM,EACtB,GAAG,EAAE,GAAG;CAE3B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* JobProcessing Event
|
|
4
|
+
*
|
|
5
|
+
* Dispatched before a job is processed by the worker.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.JobProcessing = void 0;
|
|
9
|
+
class JobProcessing {
|
|
10
|
+
connectionName;
|
|
11
|
+
job;
|
|
12
|
+
constructor(connectionName, job) {
|
|
13
|
+
this.connectionName = connectionName;
|
|
14
|
+
this.job = job;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.JobProcessing = JobProcessing;
|
|
18
|
+
//# sourceMappingURL=JobProcessing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobProcessing.js","sourceRoot":"","sources":["../../../src/Queue/Events/JobProcessing.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH,MAAa,aAAa;IAEN;IACA;IAFlB,YACkB,cAAsB,EACtB,GAAQ;QADR,mBAAc,GAAd,cAAc,CAAQ;QACtB,QAAG,GAAH,GAAG,CAAK;IACvB,CAAC;CACL;AALD,sCAKC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JobQueued Event
|
|
3
|
+
*
|
|
4
|
+
* Dispatched when a job is pushed onto the queue.
|
|
5
|
+
*/
|
|
6
|
+
import type { Job } from '../Job';
|
|
7
|
+
export declare class JobQueued {
|
|
8
|
+
readonly connectionName: string;
|
|
9
|
+
readonly queue: string;
|
|
10
|
+
readonly job: Job;
|
|
11
|
+
readonly id: string;
|
|
12
|
+
constructor(connectionName: string, queue: string, job: Job, id: string);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=JobQueued.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobQueued.d.ts","sourceRoot":"","sources":["../../../src/Queue/Events/JobQueued.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAElC,qBAAa,SAAS;aAEF,cAAc,EAAE,MAAM;aACtB,KAAK,EAAE,MAAM;aACb,GAAG,EAAE,GAAG;aACR,EAAE,EAAE,MAAM;gBAHV,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,MAAM;CAE7B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* JobQueued Event
|
|
4
|
+
*
|
|
5
|
+
* Dispatched when a job is pushed onto the queue.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.JobQueued = void 0;
|
|
9
|
+
class JobQueued {
|
|
10
|
+
connectionName;
|
|
11
|
+
queue;
|
|
12
|
+
job;
|
|
13
|
+
id;
|
|
14
|
+
constructor(connectionName, queue, job, id) {
|
|
15
|
+
this.connectionName = connectionName;
|
|
16
|
+
this.queue = queue;
|
|
17
|
+
this.job = job;
|
|
18
|
+
this.id = id;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.JobQueued = JobQueued;
|
|
22
|
+
//# sourceMappingURL=JobQueued.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobQueued.js","sourceRoot":"","sources":["../../../src/Queue/Events/JobQueued.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH,MAAa,SAAS;IAEF;IACA;IACA;IACA;IAJlB,YACkB,cAAsB,EACtB,KAAa,EACb,GAAQ,EACR,EAAU;QAHV,mBAAc,GAAd,cAAc,CAAQ;QACtB,UAAK,GAAL,KAAK,CAAQ;QACb,QAAG,GAAH,GAAG,CAAK;QACR,OAAE,GAAF,EAAE,CAAQ;IACzB,CAAC;CACL;AAPD,8BAOC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JobRetryRequested Event
|
|
3
|
+
*
|
|
4
|
+
* Dispatched when a failed job is manually retried.
|
|
5
|
+
*/
|
|
6
|
+
export declare class JobRetryRequested {
|
|
7
|
+
readonly payload: string;
|
|
8
|
+
readonly connectionName: string;
|
|
9
|
+
readonly queue: string;
|
|
10
|
+
constructor(payload: string, connectionName: string, queue: string);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=JobRetryRequested.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobRetryRequested.d.ts","sourceRoot":"","sources":["../../../src/Queue/Events/JobRetryRequested.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qBAAa,iBAAiB;aAEV,OAAO,EAAE,MAAM;aACf,cAAc,EAAE,MAAM;aACtB,KAAK,EAAE,MAAM;gBAFb,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM;CAEhC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* JobRetryRequested Event
|
|
4
|
+
*
|
|
5
|
+
* Dispatched when a failed job is manually retried.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.JobRetryRequested = void 0;
|
|
9
|
+
class JobRetryRequested {
|
|
10
|
+
payload;
|
|
11
|
+
connectionName;
|
|
12
|
+
queue;
|
|
13
|
+
constructor(payload, connectionName, queue) {
|
|
14
|
+
this.payload = payload;
|
|
15
|
+
this.connectionName = connectionName;
|
|
16
|
+
this.queue = queue;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.JobRetryRequested = JobRetryRequested;
|
|
20
|
+
//# sourceMappingURL=JobRetryRequested.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobRetryRequested.js","sourceRoot":"","sources":["../../../src/Queue/Events/JobRetryRequested.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,MAAa,iBAAiB;IAEV;IACA;IACA;IAHlB,YACkB,OAAe,EACf,cAAsB,EACtB,KAAa;QAFb,YAAO,GAAP,OAAO,CAAQ;QACf,mBAAc,GAAd,cAAc,CAAQ;QACtB,UAAK,GAAL,KAAK,CAAQ;IAC5B,CAAC;CACL;AAND,8CAMC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WorkerStopping Event
|
|
3
|
+
*
|
|
4
|
+
* Dispatched when a queue worker is stopping.
|
|
5
|
+
*/
|
|
6
|
+
export declare class WorkerStopping {
|
|
7
|
+
readonly status: number;
|
|
8
|
+
readonly workerName?: string | undefined;
|
|
9
|
+
constructor(status?: number, workerName?: string | undefined);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=WorkerStopping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkerStopping.d.ts","sourceRoot":"","sources":["../../../src/Queue/Events/WorkerStopping.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qBAAa,cAAc;aAEP,MAAM,EAAE,MAAM;aACd,UAAU,CAAC,EAAE,MAAM;gBADnB,MAAM,GAAE,MAAU,EAClB,UAAU,CAAC,EAAE,MAAM,YAAA;CAEtC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* WorkerStopping Event
|
|
4
|
+
*
|
|
5
|
+
* Dispatched when a queue worker is stopping.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.WorkerStopping = void 0;
|
|
9
|
+
class WorkerStopping {
|
|
10
|
+
status;
|
|
11
|
+
workerName;
|
|
12
|
+
constructor(status = 0, workerName) {
|
|
13
|
+
this.status = status;
|
|
14
|
+
this.workerName = workerName;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.WorkerStopping = WorkerStopping;
|
|
18
|
+
//# sourceMappingURL=WorkerStopping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkerStopping.js","sourceRoot":"","sources":["../../../src/Queue/Events/WorkerStopping.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,MAAa,cAAc;IAEP;IACA;IAFlB,YACkB,SAAiB,CAAC,EAClB,UAAmB;QADnB,WAAM,GAAN,MAAM,CAAY;QAClB,eAAU,GAAV,UAAU,CAAS;IAClC,CAAC;CACL;AALD,wCAKC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { JobQueued } from './JobQueued';
|
|
2
|
+
export { JobProcessing } from './JobProcessing';
|
|
3
|
+
export { JobProcessed } from './JobProcessed';
|
|
4
|
+
export { JobFailed } from './JobFailed';
|
|
5
|
+
export { JobExceptionOccurred } from './JobExceptionOccurred';
|
|
6
|
+
export { JobRetryRequested } from './JobRetryRequested';
|
|
7
|
+
export { WorkerStopping } from './WorkerStopping';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Queue/Events/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkerStopping = exports.JobRetryRequested = exports.JobExceptionOccurred = exports.JobFailed = exports.JobProcessed = exports.JobProcessing = exports.JobQueued = void 0;
|
|
4
|
+
var JobQueued_1 = require("./JobQueued");
|
|
5
|
+
Object.defineProperty(exports, "JobQueued", { enumerable: true, get: function () { return JobQueued_1.JobQueued; } });
|
|
6
|
+
var JobProcessing_1 = require("./JobProcessing");
|
|
7
|
+
Object.defineProperty(exports, "JobProcessing", { enumerable: true, get: function () { return JobProcessing_1.JobProcessing; } });
|
|
8
|
+
var JobProcessed_1 = require("./JobProcessed");
|
|
9
|
+
Object.defineProperty(exports, "JobProcessed", { enumerable: true, get: function () { return JobProcessed_1.JobProcessed; } });
|
|
10
|
+
var JobFailed_1 = require("./JobFailed");
|
|
11
|
+
Object.defineProperty(exports, "JobFailed", { enumerable: true, get: function () { return JobFailed_1.JobFailed; } });
|
|
12
|
+
var JobExceptionOccurred_1 = require("./JobExceptionOccurred");
|
|
13
|
+
Object.defineProperty(exports, "JobExceptionOccurred", { enumerable: true, get: function () { return JobExceptionOccurred_1.JobExceptionOccurred; } });
|
|
14
|
+
var JobRetryRequested_1 = require("./JobRetryRequested");
|
|
15
|
+
Object.defineProperty(exports, "JobRetryRequested", { enumerable: true, get: function () { return JobRetryRequested_1.JobRetryRequested; } });
|
|
16
|
+
var WorkerStopping_1 = require("./WorkerStopping");
|
|
17
|
+
Object.defineProperty(exports, "WorkerStopping", { enumerable: true, get: function () { return WorkerStopping_1.WorkerStopping; } });
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Queue/Events/index.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DatabaseFailedJobProvider
|
|
3
|
+
*
|
|
4
|
+
* Stores failed jobs in a database table.
|
|
5
|
+
* Mirrors Laravel's Illuminate\Queue\Failed\DatabaseUuidFailedJobProvider.
|
|
6
|
+
*/
|
|
7
|
+
import type { FailedJobProvider, FailedJobRecord } from './FailedJobProvider';
|
|
8
|
+
import type { Application } from '../../Foundation/Application';
|
|
9
|
+
import type { Connection } from '../../Database/Connection';
|
|
10
|
+
export declare class DatabaseFailedJobProvider implements FailedJobProvider {
|
|
11
|
+
protected app: Application;
|
|
12
|
+
protected table: string;
|
|
13
|
+
protected databaseConnection?: string;
|
|
14
|
+
constructor(app: Application, config: {
|
|
15
|
+
table?: string;
|
|
16
|
+
database?: string;
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* Get the database connection
|
|
20
|
+
*/
|
|
21
|
+
protected getConnection(): Connection;
|
|
22
|
+
log(connection: string, queue: string, payload: string, exception: Error): Promise<string>;
|
|
23
|
+
all(): Promise<FailedJobRecord[]>;
|
|
24
|
+
find(id: string | number): Promise<FailedJobRecord | null>;
|
|
25
|
+
forget(id: string | number): Promise<boolean>;
|
|
26
|
+
flush(hours?: number): Promise<void>;
|
|
27
|
+
count(connection?: string, queue?: string): Promise<number>;
|
|
28
|
+
/**
|
|
29
|
+
* Format an exception for storage
|
|
30
|
+
*/
|
|
31
|
+
protected formatException(exception: Error): string;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=DatabaseFailedJobProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabaseFailedJobProvider.d.ts","sourceRoot":"","sources":["../../../src/Queue/Failed/DatabaseFailedJobProvider.ts"],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**
|
|
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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,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QACxC,CAAC;IACH,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,UAAmB,EAAE,KAAc;QAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAClC,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEnC,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;QACrD,CAAC;QAED,IAAI,KAAK,EAAE,CAAC;YACV,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3C,CAAC;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"}
|