Skip to content

Commit

Permalink
Kill pool worker one by one instead of all at once, #61
Browse files Browse the repository at this point in the history
  • Loading branch information
hollodotme committed Aug 13, 2020
1 parent daaaa8a commit 5410512
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/Integration/SignaledWorkersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use function escapeshellarg;
use function exec;
use function http_build_query;
use function implode;
use function preg_match;
use function shell_exec;
use function sleep;
Expand Down Expand Up @@ -256,8 +255,10 @@ private function killPhpFpmChildProcesses( string $poolName, int $signal ) : voi

private function killPoolWorkers( array $PIDs, int $signal ) : void
{
$command = sprintf( 'kill -%d %s', $signal, implode( ' ', $PIDs ) );
exec( $command );
foreach ( $PIDs as $PID )
{
$this->killPoolWorker( $PID, $signal );
}
}

/**
Expand Down

0 comments on commit 5410512

Please sign in to comment.