Skip to content

Commit

Permalink
Merge pull request #77 from gadget-inc/no-eager-termination
Browse files Browse the repository at this point in the history
Don't terminate DL binary client subprocesses when the parent process is SIGTERM'd
  • Loading branch information
angelini authored Mar 11, 2024
2 parents a135d30 + 9a69c94 commit 457d162
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/src/binary-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ export class DateiLagerBinaryClient {
}
const subprocess = execa(this._options.command, baseArgs.concat(args), {
cwd,
cleanup: false, // don't terminate this subprocess process eagerly when the parent process is terminated, which is execa's default behaviour. we use graceful shutdown gadget-side to give running operations a chance to complete, and we don't want to terminate them prematurely
timeout: options?.timeout ?? this._options.timeout[method],
env: { DL_TOKEN: await this._options.token() },
});
Expand Down

0 comments on commit 457d162

Please sign in to comment.