2014-06-05 21:13:44 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorAphlictManagementRestartWorkflow
|
|
|
|
extends PhabricatorAphlictManagementWorkflow {
|
|
|
|
|
2015-01-15 21:42:07 +01:00
|
|
|
protected function didConstruct() {
|
2014-06-05 21:13:44 +02:00
|
|
|
$this
|
|
|
|
->setName('restart')
|
2016-04-13 17:51:12 +02:00
|
|
|
->setSynopsis(pht('Stop, then start the notification server.'))
|
|
|
|
->setArguments($this->getLaunchArguments());
|
2014-06-05 21:13:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function execute(PhutilArgumentParser $args) {
|
2016-04-13 17:51:12 +02:00
|
|
|
$this->parseLaunchArguments($args);
|
2015-01-08 23:59:33 +01:00
|
|
|
|
2014-06-05 21:13:44 +02:00
|
|
|
$err = $this->executeStopCommand();
|
|
|
|
if ($err) {
|
|
|
|
return $err;
|
|
|
|
}
|
2016-04-13 17:51:12 +02:00
|
|
|
|
2014-06-05 21:13:44 +02:00
|
|
|
return $this->executeStartCommand();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|