@orion-js/dogs 4.5.1 → 4.6.2
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/index.cjs +448 -177
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +448 -177
- package/dist/index.js.map +1 -1
- package/dist/repos/JobsRepo.d.ts +23 -7
- package/dist/services/Executor.d.ts +5 -5
- package/dist/services/WorkerService.d.ts +46 -13
- package/dist/types/JobRecord.d.ts +8 -0
- package/dist/types/StartConfig.d.ts +4 -3
- package/dist/types/Worker.d.ts +6 -11
- package/package.json +1 -1
package/dist/types/Worker.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { JobDefinition } from './JobsDefinition';
|
|
|
4
4
|
export interface JobToRun {
|
|
5
5
|
jobId: string;
|
|
6
6
|
executionId: string;
|
|
7
|
+
lockId: string;
|
|
7
8
|
name: string;
|
|
8
9
|
type: 'event' | 'recurrent';
|
|
9
10
|
params: Blackbox;
|
|
@@ -21,21 +22,15 @@ export interface ExecutionContext {
|
|
|
21
22
|
extendLockTime: (extraTime: number) => Promise<void>;
|
|
22
23
|
clearStaleTimeout: () => void;
|
|
23
24
|
}
|
|
24
|
-
export interface WorkerInstance {
|
|
25
|
-
running: boolean;
|
|
26
|
-
workerIndex: number;
|
|
27
|
-
stop: () => Promise<void>;
|
|
28
|
-
respawn: () => Promise<void>;
|
|
29
|
-
promise?: Promise<any>;
|
|
30
|
-
}
|
|
31
25
|
export interface WorkersInstance {
|
|
32
26
|
running: boolean;
|
|
33
27
|
workersCount: number;
|
|
34
|
-
workers: WorkerInstance[];
|
|
35
|
-
runningJobsByName: Map<string, number>;
|
|
36
|
-
jobAcquisitionLock: Promise<void>;
|
|
37
28
|
/**
|
|
38
|
-
*
|
|
29
|
+
* Number of active executions currently consuming scheduler capacity.
|
|
30
|
+
*/
|
|
31
|
+
readonly runningExecutions: number;
|
|
32
|
+
/**
|
|
33
|
+
* Stop acquiring jobs and wait for active lock-owning executions to finish or become stale.
|
|
39
34
|
*/
|
|
40
35
|
stop: () => Promise<void>;
|
|
41
36
|
}
|