Path: blob/master/src/applications/daemon/management/PhabricatorDaemonManagementRestartWorkflow.php
12256 views
<?php12final class PhabricatorDaemonManagementRestartWorkflow3extends PhabricatorDaemonManagementWorkflow {45protected function didConstruct() {6$this7->setName('restart')8->setSynopsis(9pht(10'Stop daemon processes on this host, then start the standard '.11'daemon loadout.'))12->setArguments(13array(14array(15'name' => 'graceful',16'param' => 'seconds',17'help' => pht(18'Grace period for daemons to attempt a clean shutdown, in '.19'seconds. Defaults to __15__ seconds.'),20'default' => 15,21),22array(23'name' => 'force',24'help' => pht(25'Stop all daemon processes on this host, even if they belong '.26'to another instance.'),27),28array(29'name' => 'gently',30'help' => pht('Deprecated. Has no effect.'),31),32$this->getAutoscaleReserveArgument(),33));34}3536public function execute(PhutilArgumentParser $args) {37$err = $this->executeStopCommand(38array(39'graceful' => $args->getArg('graceful'),40'force' => $args->getArg('force'),41));4243if ($err) {44return $err;45}4647return $this->executeStartCommand(48array(49'reserve' => (float)$args->getArg('autoscale-reserve'),50));51}5253}545556