diff options
author | Wolfy-J <[email protected]> | 2018-01-28 15:42:17 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-01-28 15:42:17 +0300 |
commit | f77a21dc89af9258451fcb7a6d47aa720978a619 (patch) | |
tree | fecc1285fcda08aa945f7651454a7689ad246935 /source/Worker.php | |
parent | a5a62eeb19e67cbeced09729757cbfdf2cde8821 (diff) |
stop by worker
Diffstat (limited to 'source/Worker.php')
-rw-r--r-- | source/Worker.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/Worker.php b/source/Worker.php index 8fdf3070..474101b4 100644 --- a/source/Worker.php +++ b/source/Worker.php @@ -24,7 +24,7 @@ use Spiral\RoadRunner\Exceptions\RoadRunnerException; class Worker { // Send as response context to request worker termination - const TERMINATE = '{"stop": true}'; + const STOP = '{"stop": true}'; /** @var Relay */ private $relay; @@ -107,13 +107,16 @@ class Worker /** * Terminate the process. Server must automatically pass task to the next available process. - * Worker will receive TerminateCommand context after calling this method. + * Worker will receive StopCommand context after calling this method. + * + * Attention, you MUST use continue; after invoking this method to let rr to properly + * stop worker. * * @throws GoridgeException */ public function stop() { - $this->send(null, self::TERMINATE); + $this->send(null, self::STOP); } /** |