@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add a `--local` flag for the `./bin/phd status` workflow.

Summary: It is sometimes useful to use `./bin/phd status` as a means to determine if daemons //are// actually running on the current host. For example, a common practice in upstart scripts is something similar to `./bin/phd status || ./bin/phd status`.

Test Plan:
```
> ./bin/phd status
ID Host PID Started Daemon Arguments
1162 ip-10-127-58-93 4046 Jun 20 2014, 3:17:43 AM PhabricatorFactDaemon
1161 ip-10-127-58-93 3984 Jun 20 2014, 3:17:43 AM PhabricatorTaskmasterDaemon
1160 ip-10-127-58-93 3973 Jun 20 2014, 3:17:42 AM PhabricatorTaskmasterDaemon
1159 ip-10-127-58-93 3968 Jun 20 2014, 3:17:42 AM PhabricatorTaskmasterDaemon
1158 ip-10-127-58-93 3943 Jun 20 2014, 3:17:42 AM PhabricatorTaskmasterDaemon
1157 ip-10-127-58-93 3914 Jun 20 2014, 3:17:41 AM PhabricatorGarbageCollectorDaemon
1156 ip-10-127-58-93 3909 Jun 20 2014, 3:17:41 AM PhabricatorRepositoryPullLocalDaemon

> ./bin/phd status --local
There are no running Phabricator daemons.
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9645

+13 -2
+13 -2
src/applications/daemon/management/PhabricatorDaemonManagementStatusWorkflow.php
··· 7 7 $this 8 8 ->setName('status') 9 9 ->setSynopsis(pht('Show status of running daemons.')) 10 - ->setArguments(array()); 10 + ->setArguments( 11 + array( 12 + array( 13 + 'name' => 'local', 14 + 'help' => pht('Show only local daemons.'), 15 + ), 16 + )); 11 17 } 12 18 13 19 public function execute(PhutilArgumentParser $args) { 14 20 $console = PhutilConsole::getConsole(); 15 - $daemons = $this->loadAllRunningDaemons(); 21 + 22 + if ($args->getArg('local')) { 23 + $daemons = $this->loadRunningDaemons(); 24 + } else { 25 + $daemons = $this->loadAllRunningDaemons(); 26 + } 16 27 17 28 if (!$daemons) { 18 29 $console->writeErr(