1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 02:02:41 +01:00
phorge-phorge/src/applications/daemon/management/PhabricatorDaemonManagementRestartWorkflow.php

35 lines
861 B
PHP
Raw Normal View History

<?php
final class PhabricatorDaemonManagementRestartWorkflow
extends PhabricatorDaemonManagementWorkflow {
public function didConstruct() {
$this
->setName('restart')
->setSynopsis(
pht(
'Stop, then start the standard daemon loadout.'))
->setArguments(
array(
array(
'name' => 'graceful',
'param' => 'seconds',
'help' => pht(
'Grace period for daemons to attempt a clean shutdown, in '.
'seconds. Defaults to __15__ seconds.'),
'default' => 15,
),
));
}
public function execute(PhutilArgumentParser $args) {
$graceful = $args->getArg('graceful');
$err = $this->executeStopCommand(array(), $graceful);
if ($err) {
return $err;
}
return $this->executeStartCommand();
}
}