@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | if ($this->autoShutdown) { |
| 82 | 82 | foreach ($statusCodes as $statusCode) { |
| 83 | 83 | if ($statusCode >= 500 && $statusCode < 600) { |
| 84 | - $this->flagShutdown('Automatic shutdown following status code: ' . $statusCode); |
|
| 84 | + $this->flagShutdown('Automatic shutdown following status code: '.$statusCode); |
|
| 85 | 85 | break; |
| 86 | 86 | } |
| 87 | 87 | } |
@@ -98,11 +98,11 @@ discard block |
||
| 98 | 98 | { |
| 99 | 99 | declare (ticks = 1); |
| 100 | 100 | |
| 101 | - pcntl_signal(SIGINT, function () { |
|
| 101 | + pcntl_signal(SIGINT, function() { |
|
| 102 | 102 | throw new ShutdownException('Daemon shutdown requested (received SIGINT)'); |
| 103 | 103 | }); |
| 104 | 104 | |
| 105 | - pcntl_signal(SIGALRM, function () { |
|
| 105 | + pcntl_signal(SIGALRM, function() { |
|
| 106 | 106 | throw new ShutdownException('Daemon time limit reached (received SIGALRM)'); |
| 107 | 107 | }); |
| 108 | 108 | } |
@@ -46,21 +46,21 @@ discard block |
||
| 46 | 46 | $this->driverContainer = $driverContainer; |
| 47 | 47 | $this->daemon = null; |
| 48 | 48 | |
| 49 | - $name = $name ?: self::DEFAULT_NAME; |
|
| 49 | + $name = $name ?: self::DEFAULT_NAME; |
|
| 50 | 50 | $description = $description ?: self::DEFAULT_DESCRIPTION; |
| 51 | 51 | |
| 52 | 52 | parent::__construct($name); |
| 53 | 53 | |
| 54 | 54 | $this |
| 55 | 55 | ->setDescription($description) |
| 56 | - ->addOption('port', null, InputOption::VALUE_OPTIONAL, 'TCP port to listen on (if not present, daemon will listen on FCGI_LISTENSOCK_FILENO)') |
|
| 57 | - ->addOption('host', null, InputOption::VALUE_OPTIONAL, 'TCP host to listen on') |
|
| 58 | - ->addOption('fd', null, InputOption::VALUE_OPTIONAL, 'File descriptor to listen on - defaults to FCGI_LISTENSOCK_FILENO', DaemonInterface::FCGI_LISTENSOCK_FILENO) |
|
| 56 | + ->addOption('port', null, InputOption::VALUE_OPTIONAL, 'TCP port to listen on (if not present, daemon will listen on FCGI_LISTENSOCK_FILENO)') |
|
| 57 | + ->addOption('host', null, InputOption::VALUE_OPTIONAL, 'TCP host to listen on') |
|
| 58 | + ->addOption('fd', null, InputOption::VALUE_OPTIONAL, 'File descriptor to listen on - defaults to FCGI_LISTENSOCK_FILENO', DaemonInterface::FCGI_LISTENSOCK_FILENO) |
|
| 59 | 59 | ->addOption('request-limit', null, InputOption::VALUE_OPTIONAL, 'The maximum number of requests to handle before shutting down') |
| 60 | - ->addOption('memory-limit', null, InputOption::VALUE_OPTIONAL, 'The memory limit on the daemon instance before shutting down') |
|
| 61 | - ->addOption('time-limit', null, InputOption::VALUE_OPTIONAL, 'The time limit on the daemon in seconds before shutting down') |
|
| 62 | - ->addOption('auto-shutdown', null, InputOption::VALUE_NONE, 'Perform a graceful shutdown after receiving a 5XX HTTP status code') |
|
| 63 | - ->addOption('driver', null, InputOption::VALUE_OPTIONAL, 'The implementation of the FastCGI protocol to use', 'userland'); |
|
| 60 | + ->addOption('memory-limit', null, InputOption::VALUE_OPTIONAL, 'The memory limit on the daemon instance before shutting down') |
|
| 61 | + ->addOption('time-limit', null, InputOption::VALUE_OPTIONAL, 'The time limit on the daemon in seconds before shutting down') |
|
| 62 | + ->addOption('auto-shutdown', null, InputOption::VALUE_NONE, 'Perform a graceful shutdown after receiving a 5XX HTTP status code') |
|
| 63 | + ->addOption('driver', null, InputOption::VALUE_OPTIONAL, 'The implementation of the FastCGI protocol to use', 'userland'); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
@@ -77,8 +77,8 @@ discard block |
||
| 77 | 77 | $logger = new ConsoleLogger($output); |
| 78 | 78 | |
| 79 | 79 | $requestLimit = $input->getOption('request-limit') ?: DaemonOptions::NO_LIMIT; |
| 80 | - $memoryLimit = $input->getOption('memory-limit') ?: DaemonOptions::NO_LIMIT; |
|
| 81 | - $timeLimit = $input->getOption('time-limit') ?: DaemonOptions::NO_LIMIT; |
|
| 80 | + $memoryLimit = $input->getOption('memory-limit') ?: DaemonOptions::NO_LIMIT; |
|
| 81 | + $timeLimit = $input->getOption('time-limit') ?: DaemonOptions::NO_LIMIT; |
|
| 82 | 82 | $autoShutdown = $input->getOption('auto-shutdown'); |
| 83 | 83 | |
| 84 | 84 | return new DaemonOptions([ |