Skip to content

Commit 1aa2d4a

Browse files
committed
fix: add job name again stats output
1 parent 57ac2db commit 1aa2d4a

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hokify/agenda",
3-
"version": "4.0.13",
3+
"version": "4.0.16",
44
"description": "Light weight job scheduler for Node.js",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -32,7 +32,7 @@
3232
},
3333
"repository": {
3434
"type": "git",
35-
"url": "git://github.com/@hokify/agenda"
35+
"url": "git://github.com/hokify/agenda"
3636
},
3737
"keywords": [
3838
"job",
@@ -45,7 +45,7 @@
4545
"author": "Ryan Schmukler <ryan@slingingcode.com> (http://slingingcode.com/)",
4646
"license": "MIT",
4747
"bugs": {
48-
"url": "https://github.com/@hokify/agenda/issues"
48+
"url": "https://github.com/hokify/agenda/issues"
4949
},
5050
"dependencies": {
5151
"cron": "~1.8.2",

src/JobProcessor.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,15 @@ export class JobProcessor {
3434
maxConcurrency: this.maxConcurrency,
3535
processEvery: this.processEvery
3636
},
37-
jobStatus: Object.keys(this.jobStatus).map(job => ({
38-
...this.jobStatus[job],
39-
config: this.agenda.definitions[job]
40-
})),
37+
jobStatus: Object.fromEntries(
38+
Object.keys(this.jobStatus).map(job => [
39+
job,
40+
{
41+
...this.jobStatus[job],
42+
config: this.agenda.definitions[job]
43+
}
44+
])
45+
),
4146
runningJobs: !fullDetails ? this.runningJobs.length : this.runningJobs,
4247
lockedJobs: !fullDetails ? this.lockedJobs.length : this.lockedJobs,
4348
jobsToLock: !fullDetails ? this.jobsToLock.length : this.jobsToLock,

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
// target settings for node 10
77
"module": "commonjs",
8-
"target": "es2018",
9-
"lib": ["es2018"],
8+
"target": "es2019",
9+
"lib": ["es2019"],
1010
// "lib": ["esnext", "esnext.asynciterable", "dom"],
1111

1212
// other best practice configs

0 commit comments

Comments
 (0)