Path: blob/master/src/applications/daemon/management/PhabricatorDaemonManagementStatusWorkflow.php
12256 views
<?php12final class PhabricatorDaemonManagementStatusWorkflow3extends PhabricatorDaemonManagementWorkflow {45protected function didConstruct() {6$this7->setName('status')8->setSynopsis(pht('Show daemon processes on this host.'));9}1011public function execute(PhutilArgumentParser $args) {12$process_refs = $this->getOverseerProcessRefs();1314if (!$process_refs) {15$instance = $this->getInstance();16if ($instance !== null) {17$this->logInfo(18pht('NO DAEMONS'),19pht(20'There are no running daemon processes for the current '.21'instance ("%s").',22$instance));23} else {24$this->logInfo(25pht('NO DAEMONS'),26pht('There are no running daemon processes.'));27}2829return 1;30}3132$table = id(new PhutilConsoleTable())33->addColumns(34array(35'pid' => array(36'title' => pht('PID'),37),38'command' => array(39'title' => pht('Command'),40),41));4243foreach ($process_refs as $process_ref) {44$table->addRow(45array(46'pid' => $process_ref->getPID(),47'command' => $process_ref->getCommand(),48));49}5051$table->draw();5253return 0;54}5556}575859