@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.

Remove Conduit daemon methods

Summary: Fixes T1670. These are now unused.

Test Plan: Grepped for callsites.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1670

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

-169
-6
src/__phutil_library_map__.php
··· 122 122 'ConduitAPI_conpherence_querythread_Method' => 'applications/conpherence/conduit/ConduitAPI_conpherence_querythread_Method.php', 123 123 'ConduitAPI_conpherence_querytransaction_Method' => 'applications/conpherence/conduit/ConduitAPI_conpherence_querytransaction_Method.php', 124 124 'ConduitAPI_conpherence_updatethread_Method' => 'applications/conpherence/conduit/ConduitAPI_conpherence_updatethread_Method.php', 125 - 'ConduitAPI_daemon_launched_Method' => 'applications/daemon/conduit/ConduitAPI_daemon_launched_Method.php', 126 - 'ConduitAPI_daemon_log_Method' => 'applications/daemon/conduit/ConduitAPI_daemon_log_Method.php', 127 - 'ConduitAPI_daemon_setstatus_Method' => 'applications/daemon/conduit/ConduitAPI_daemon_setstatus_Method.php', 128 125 'ConduitAPI_differential_Method' => 'applications/differential/conduit/ConduitAPI_differential_Method.php', 129 126 'ConduitAPI_differential_close_Method' => 'applications/differential/conduit/ConduitAPI_differential_close_Method.php', 130 127 'ConduitAPI_differential_createcomment_Method' => 'applications/differential/conduit/ConduitAPI_differential_createcomment_Method.php', ··· 2099 2096 'ConduitAPI_conpherence_querythread_Method' => 'ConduitAPI_conpherence_Method', 2100 2097 'ConduitAPI_conpherence_querytransaction_Method' => 'ConduitAPI_conpherence_Method', 2101 2098 'ConduitAPI_conpherence_updatethread_Method' => 'ConduitAPI_conpherence_Method', 2102 - 'ConduitAPI_daemon_launched_Method' => 'ConduitAPIMethod', 2103 - 'ConduitAPI_daemon_log_Method' => 'ConduitAPIMethod', 2104 - 'ConduitAPI_daemon_setstatus_Method' => 'ConduitAPIMethod', 2105 2099 'ConduitAPI_differential_Method' => 'ConduitAPIMethod', 2106 2100 'ConduitAPI_differential_close_Method' => 'ConduitAPIMethod', 2107 2101 'ConduitAPI_differential_createcomment_Method' => 'ConduitAPIMethod',
-56
src/applications/daemon/conduit/ConduitAPI_daemon_launched_Method.php
··· 1 - <?php 2 - 3 - /** 4 - * @group conduit 5 - */ 6 - final class ConduitAPI_daemon_launched_Method extends ConduitAPIMethod { 7 - 8 - public function getMethodStatus() { 9 - return self::METHOD_STATUS_DEPRECATED; 10 - } 11 - 12 - public function shouldRequireAuthentication() { 13 - return false; 14 - } 15 - 16 - public function shouldAllowUnguardedWrites() { 17 - return true; 18 - } 19 - 20 - public function getMethodDescription() { 21 - return "Used by daemons to log run status."; 22 - } 23 - 24 - public function defineParamTypes() { 25 - return array( 26 - 'daemon' => 'required string', 27 - 'host' => 'required string', 28 - 'pid' => 'required int', 29 - 'argv' => 'required string', 30 - ); 31 - } 32 - 33 - public function defineReturnType() { 34 - return 'string'; 35 - } 36 - 37 - public function defineErrorTypes() { 38 - return array( 39 - ); 40 - } 41 - 42 - protected function execute(ConduitAPIRequest $request) { 43 - 44 - $daemon_log = new PhabricatorDaemonLog(); 45 - $daemon_log->setDaemon($request->getValue('daemon')); 46 - $daemon_log->setHost($request->getValue('host')); 47 - $daemon_log->setPID($request->getValue('pid')); 48 - $daemon_log->setStatus(PhabricatorDaemonLog::STATUS_RUNNING); 49 - $daemon_log->setArgv(json_decode($request->getValue('argv'))); 50 - 51 - $daemon_log->save(); 52 - 53 - return $daemon_log->getID(); 54 - } 55 - 56 - }
-54
src/applications/daemon/conduit/ConduitAPI_daemon_log_Method.php
··· 1 - <?php 2 - 3 - /** 4 - * @group conduit 5 - */ 6 - final class ConduitAPI_daemon_log_Method extends ConduitAPIMethod { 7 - 8 - public function getMethodStatus() { 9 - return self::METHOD_STATUS_DEPRECATED; 10 - } 11 - 12 - public function shouldRequireAuthentication() { 13 - return false; 14 - } 15 - 16 - public function shouldAllowUnguardedWrites() { 17 - return true; 18 - } 19 - 20 - public function getMethodDescription() { 21 - return "Used by daemons to log events."; 22 - } 23 - 24 - public function defineParamTypes() { 25 - return array( 26 - 'daemonLogID' => 'required int', 27 - 'type' => 'required string', 28 - 'message' => 'optional string', 29 - ); 30 - } 31 - 32 - public function defineReturnType() { 33 - return 'void'; 34 - } 35 - 36 - public function defineErrorTypes() { 37 - return array( 38 - ); 39 - } 40 - 41 - protected function execute(ConduitAPIRequest $request) { 42 - 43 - $daemon_event = new PhabricatorDaemonLogEvent(); 44 - $daemon_event->setLogID($request->getValue('daemonLogID')); 45 - $daemon_event->setLogType($request->getValue('type')); 46 - $daemon_event->setMessage((string)$request->getValue('message')); 47 - $daemon_event->setEpoch(time()); 48 - 49 - $daemon_event->save(); 50 - 51 - return; 52 - } 53 - 54 - }
-53
src/applications/daemon/conduit/ConduitAPI_daemon_setstatus_Method.php
··· 1 - <?php 2 - 3 - /** 4 - * @group conduit 5 - */ 6 - final class ConduitAPI_daemon_setstatus_Method extends ConduitAPIMethod { 7 - 8 - public function getMethodStatus() { 9 - return self::METHOD_STATUS_DEPRECATED; 10 - } 11 - 12 - public function shouldRequireAuthentication() { 13 - return false; 14 - } 15 - 16 - public function shouldAllowUnguardedWrites() { 17 - return true; 18 - } 19 - 20 - public function getMethodDescription() { 21 - return "Used by daemons to update their status."; 22 - } 23 - 24 - public function defineParamTypes() { 25 - return array( 26 - 'daemonLogID' => 'required string', 27 - 'status' => 'required enum<unknown, run, timeout, dead, exit>', 28 - ); 29 - } 30 - 31 - public function defineReturnType() { 32 - return 'void'; 33 - } 34 - 35 - public function defineErrorTypes() { 36 - return array( 37 - 'ERR-INVALID-ID' => 'An invalid daemonLogID was provided.', 38 - ); 39 - } 40 - 41 - protected function execute(ConduitAPIRequest $request) { 42 - 43 - $daemon_log = id(new PhabricatorDaemonLog()) 44 - ->load($request->getValue('daemonLogID')); 45 - if (!$daemon_log) { 46 - throw new ConduitException('ERR-INVALID-ID'); 47 - } 48 - $daemon_log->setStatus($request->getValue('status')); 49 - 50 - $daemon_log->save(); 51 - } 52 - 53 - }