@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<?php
2
3final class PhabricatorDaemonManagementStopWorkflow
4 extends PhabricatorDaemonManagementWorkflow {
5
6 protected function didConstruct() {
7 $this
8 ->setName('stop')
9 ->setSynopsis(pht('Stop daemon processes on this host.'))
10 ->setArguments(
11 array(
12 array(
13 'name' => 'graceful',
14 'param' => 'seconds',
15 'help' => pht(
16 'Grace period for daemons to attempt a clean shutdown, in '.
17 'seconds. Defaults to __15__ seconds.'),
18 'default' => 15,
19 ),
20 array(
21 'name' => 'force',
22 'help' => pht(
23 'Stop all daemon processes on this host, even if they belong '.
24 'to another instance.'),
25 ),
26 ));
27 }
28
29 public function execute(PhutilArgumentParser $args) {
30 return $this->executeStopCommand(
31 array(
32 'graceful' => $args->getArg('graceful'),
33 'force' => $args->getArg('force'),
34 ));
35 }
36
37}