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() {
|
2015-01-08 23:59:33 +01:00
|
|
|
parent::didConstruct();
|
2014-06-05 21:13:44 +02:00
|
|
|
$this
|
|
|
|
->setName('restart')
|
2015-01-08 23:59:33 +01:00
|
|
|
->setSynopsis(pht('Stop, then start the notifications server.'));
|
2014-06-05 21:13:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function execute(PhutilArgumentParser $args) {
|
2015-01-08 23:59:33 +01:00
|
|
|
parent::execute($args);
|
|
|
|
|
2014-06-05 21:13:44 +02:00
|
|
|
$err = $this->executeStopCommand();
|
|
|
|
if ($err) {
|
|
|
|
return $err;
|
|
|
|
}
|
|
|
|
return $this->executeStartCommand();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|