Skip to content

Commit

Permalink
fix: add job name again stats output
Browse files Browse the repository at this point in the history
  • Loading branch information
simllll committed Oct 14, 2020
1 parent 57ac2db commit 1aa2d4a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hokify/agenda",
"version": "4.0.13",
"version": "4.0.16",
"description": "Light weight job scheduler for Node.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -32,7 +32,7 @@
},
"repository": {
"type": "git",
"url": "git://github.com/@hokify/agenda"
"url": "git://github.com/hokify/agenda"
},
"keywords": [
"job",
Expand All @@ -45,7 +45,7 @@
"author": "Ryan Schmukler <ryan@slingingcode.com> (http://slingingcode.com/)",
"license": "MIT",
"bugs": {
"url": "https://github.com/@hokify/agenda/issues"
"url": "https://github.com/hokify/agenda/issues"
},
"dependencies": {
"cron": "~1.8.2",
Expand Down
13 changes: 9 additions & 4 deletions src/JobProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,15 @@ export class JobProcessor {
maxConcurrency: this.maxConcurrency,
processEvery: this.processEvery
},
jobStatus: Object.keys(this.jobStatus).map(job => ({
...this.jobStatus[job],
config: this.agenda.definitions[job]
})),
jobStatus: Object.fromEntries(
Object.keys(this.jobStatus).map(job => [
job,
{
...this.jobStatus[job],
config: this.agenda.definitions[job]
}
])
),
runningJobs: !fullDetails ? this.runningJobs.length : this.runningJobs,
lockedJobs: !fullDetails ? this.lockedJobs.length : this.lockedJobs,
jobsToLock: !fullDetails ? this.jobsToLock.length : this.jobsToLock,
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

// target settings for node 10
"module": "commonjs",
"target": "es2018",
"lib": ["es2018"],
"target": "es2019",
"lib": ["es2019"],
// "lib": ["esnext", "esnext.asynciterable", "dom"],

// other best practice configs
Expand Down

0 comments on commit 1aa2d4a

Please sign in to comment.