Remove product literal strings in "pht()", part 8
[phabricator.git] / src / applications / daemon / management / PhabricatorDaemonManagementRestartWorkflow.php
blobeb2d5d229c84b3eda55791d37139651284f5ac5a
1 <?php
3 final class PhabricatorDaemonManagementRestartWorkflow
4 extends PhabricatorDaemonManagementWorkflow {
6 protected function didConstruct() {
7 $this
8 ->setName('restart')
9 ->setSynopsis(
10 pht(
11 'Stop daemon processes on this host, then start the standard '.
12 'daemon loadout.'))
13 ->setArguments(
14 array(
15 array(
16 'name' => 'graceful',
17 'param' => 'seconds',
18 'help' => pht(
19 'Grace period for daemons to attempt a clean shutdown, in '.
20 'seconds. Defaults to __15__ seconds.'),
21 'default' => 15,
23 array(
24 'name' => 'force',
25 'help' => pht(
26 'Stop all daemon processes on this host, even if they belong '.
27 'to another Phabricator instance.'),
29 array(
30 'name' => 'gently',
31 'help' => pht('Deprecated. Has no effect.'),
33 $this->getAutoscaleReserveArgument(),
34 ));
37 public function execute(PhutilArgumentParser $args) {
38 $err = $this->executeStopCommand(
39 array(
40 'graceful' => $args->getArg('graceful'),
41 'force' => $args->getArg('force'),
42 ));
44 if ($err) {
45 return $err;
48 return $this->executeStartCommand(
49 array(
50 'reserve' => (float)$args->getArg('autoscale-reserve'),
51 ));