File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,13 @@ export class JobProcessor {
21
21
| undefined ;
22
22
} = { } ;
23
23
24
- async getStatus ( ) {
24
+ async getStatus ( fullDetails = false ) {
25
25
return {
26
26
queueSize : await this . agenda . db . getQueueSize ( ) ,
27
27
jobStatus : this . jobStatus ,
28
- runningJobs : this . runningJobs . length ,
29
- lockedJobs : this . lockedJobs . length ,
30
- jobsToLock : this . jobsToLock . length ,
28
+ runningJobs : ! fullDetails ? this . runningJobs . length : this . runningJobs ,
29
+ lockedJobs : ! fullDetails ? this . lockedJobs . length : this . lockedJobs ,
30
+ jobsToLock : ! fullDetails ? this . jobsToLock . length : this . jobsToLock ,
31
31
isLockingOnTheFly : this . isLockingOnTheFly
32
32
} ;
33
33
}
Original file line number Diff line number Diff line change @@ -49,11 +49,11 @@ export class Agenda extends EventEmitter {
49
49
50
50
private ready : Promise < void > ;
51
51
52
- getRunningStats ( ) {
52
+ getRunningStats ( fullDetails = false ) {
53
53
if ( ! this . jobProcessor ) {
54
54
throw new Error ( 'agenda not running!' ) ;
55
55
}
56
- return this . jobProcessor . getStatus ( ) ;
56
+ return this . jobProcessor . getStatus ( fullDetails ) ;
57
57
}
58
58
59
59
constructor (
You can’t perform that action at this time.
0 commit comments