Skip to content

Commit

Permalink
fix: add fork paramters to console
Browse files Browse the repository at this point in the history
  • Loading branch information
simllll committed May 10, 2022
1 parent c3d63c1 commit 9f2e7fd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,21 @@ export class Job<DATA = unknown | void> {
forkHelper.path,
[this.attrs.name, this.attrs._id!.toString(), location],
{
signal,
...forkHelper.options
...forkHelper.options,
signal
}
);

child.on('close', code => {
stillRunning = false;
if (code) {
console.info(
'fork parameters',
forkHelper,
this.attrs.name,
this.attrs._id,
location
);
const error = new Error(`child process exited with code: ${code}`);
console.warn(error.message);
reject(error);
Expand Down

0 comments on commit 9f2e7fd

Please sign in to comment.