Page MenuHomePhabricator

D11784.id28405.diff
No OneTemporary

D11784.id28405.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,7 +7,7 @@
*/
return array(
'names' => array(
- 'core.pkg.css' => '86353aff',
+ 'core.pkg.css' => 'f8f4b8dc',
'core.pkg.js' => '23d653bb',
'darkconsole.pkg.js' => '8ab24e01',
'differential.pkg.css' => '380f07e5',
@@ -124,9 +124,9 @@
'rsrc/css/phui/phui-action-list.css' => '9ee9910a',
'rsrc/css/phui/phui-action-panel.css' => '4bcb288d',
'rsrc/css/phui/phui-box.css' => '7b3a2eed',
- 'rsrc/css/phui/phui-button.css' => '008ba5e2',
+ 'rsrc/css/phui/phui-button.css' => 'ffe12633',
'rsrc/css/phui/phui-crumbs-view.css' => '594d719e',
- 'rsrc/css/phui/phui-document.css' => 'a494bdf8',
+ 'rsrc/css/phui/phui-document.css' => '8240b0b1',
'rsrc/css/phui/phui-error-view.css' => 'ad042fdd',
'rsrc/css/phui/phui-feed-story.css' => 'c9f3a0b5',
'rsrc/css/phui/phui-fontkit.css' => '9ae12677',
@@ -773,13 +773,13 @@
'phui-action-header-view-css' => '89c497e7',
'phui-action-panel-css' => '4bcb288d',
'phui-box-css' => '7b3a2eed',
- 'phui-button-css' => '008ba5e2',
+ 'phui-button-css' => 'ffe12633',
'phui-calendar-css' => '8675968e',
'phui-calendar-day-css' => 'de035c8a',
'phui-calendar-list-css' => 'c1d0ca59',
'phui-calendar-month-css' => 'a92e47d2',
'phui-crumbs-view-css' => '594d719e',
- 'phui-document-view-css' => 'a494bdf8',
+ 'phui-document-view-css' => '8240b0b1',
'phui-error-view-css' => 'ad042fdd',
'phui-feed-story-css' => 'c9f3a0b5',
'phui-font-icon-base-css' => '3dad2ae3',
diff --git a/src/applications/daemon/management/PhabricatorDaemonManagementRestartWorkflow.php b/src/applications/daemon/management/PhabricatorDaemonManagementRestartWorkflow.php
--- a/src/applications/daemon/management/PhabricatorDaemonManagementRestartWorkflow.php
+++ b/src/applications/daemon/management/PhabricatorDaemonManagementRestartWorkflow.php
@@ -20,6 +20,12 @@
'default' => 15,
),
array(
+ 'name' => 'gently',
+ 'help' => pht(
+ 'Ignore running processes that look like daemons but do not '.
+ 'have corresponding PID files.'),
+ ),
+ array(
'name' => 'force',
'help' => pht(
'Also stop running processes that look like daemons but do '.
@@ -29,12 +35,17 @@
}
public function execute(PhutilArgumentParser $args) {
- $graceful = $args->getArg('graceful');
- $force = $args->getArg('force');
- $err = $this->executeStopCommand(array(), $graceful, $force);
+ $err = $this->executeStopCommand(
+ array(),
+ array(
+ 'graceful' => $args->getArg('graceful'),
+ 'force' => $args->getArg('force'),
+ 'gently' => $args->getArg('gently'),
+ ));
if ($err) {
return $err;
}
+
return $this->executeStartCommand();
}
diff --git a/src/applications/daemon/management/PhabricatorDaemonManagementStopWorkflow.php b/src/applications/daemon/management/PhabricatorDaemonManagementStopWorkflow.php
--- a/src/applications/daemon/management/PhabricatorDaemonManagementStopWorkflow.php
+++ b/src/applications/daemon/management/PhabricatorDaemonManagementStopWorkflow.php
@@ -27,6 +27,12 @@
'not have corresponding PID files.'),
),
array(
+ 'name' => 'gently',
+ 'help' => pht(
+ 'Ignore running processes that look like daemons but do not '.
+ 'have corresponding PID files.'),
+ ),
+ array(
'name' => 'pids',
'wildcard' => true,
),
@@ -34,10 +40,13 @@
}
public function execute(PhutilArgumentParser $args) {
- $pids = $args->getArg('pids');
- $graceful = $args->getArg('graceful');
- $force = $args->getArg('force');
- return $this->executeStopCommand($pids, $graceful, $force);
+ return $this->executeStopCommand(
+ $args->getArg('pids'),
+ array(
+ 'graceful' => $args->getArg('graceful'),
+ 'force' => $args->getArg('force'),
+ 'gently' => $args->getArg('gently'),
+ ));
}
}
diff --git a/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php b/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php
--- a/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php
+++ b/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php
@@ -361,15 +361,25 @@
protected final function executeStopCommand(
array $pids,
- $grace_period,
- $force) {
+ array $options) {
$console = PhutilConsole::getConsole();
+ $grace_period = idx($options, 'graceful', 15);
+ $force = idx($options, 'force');
+ $gently = idx($options, 'gently');
+
+ if ($gently && $force) {
+ throw new PhutilArgumentUsageException(
+ pht(
+ 'You can not specify conflicting options --gently and --force '.
+ 'together.'));
+ }
+
$daemons = $this->loadRunningDaemons();
if (!$daemons) {
$survivors = array();
- if (!$pids) {
+ if (!$pids && !$gently) {
$survivors = $this->processRogueDaemons(
$grace_period,
$warn = true,
@@ -421,7 +431,9 @@
}
}
- $this->processRogueDaemons($grace_period, !$pids, $force);
+ if (!$gently) {
+ $this->processRogueDaemons($grace_period, !$pids, $force);
+ }
return 0;
}

File Metadata

Mime Type
text/plain
Expires
Fri, Jun 28, 6:35 PM (3 d, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6320237
Default Alt Text
D11784.id28405.diff (5 KB)

Event Timeline