Skip to content

Commit

Permalink
fix restarting bot by killing all child processes of bot (#2861)
Browse files Browse the repository at this point in the history
Calling `child_process.kill()` will kill that process but does not kill all processes spawned by that process. We need to run the bot in a detached process which gets its own process group, then call `process.kill(-child.pid)` to kill all porcesses in that group.
  • Loading branch information
a-b-r-o-w-n authored May 1, 2020
1 parent 97c425e commit 2197497
Show file tree
Hide file tree
Showing 5 changed files with 487 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ export class ComposerPluginRegistration {
this._description = val;
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
public log(message: string, ...args: any[]) {
this._log(message, ...args);
public get log() {
return this._log;
}

/**************************************************************************************
Expand Down
Loading

0 comments on commit 2197497

Please sign in to comment.