Select the types of activity you want to include in your feed.
@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
···1095109510961096 // Directory that phd (the Phabricator daemon control script) should use to
10971097 // track running daemons.
10981098- 'phd.pid-directory' => '/var/tmp/phd',
10981098+ 'phd.pid-directory' => '/var/tmp/phd/pid',
10991099+11001100+ // Directory that the Phabricator daemons should use to store the log file
11011101+ 'phd.log-directory' => '/var/tmp/phd/log',
1099110211001103 // Number of "TaskMaster" daemons that "phd start" should start. You can
11011104 // raise this if you have a task backlog, or explicitly launch more with
+1-1
scripts/daemon/phabricator_daemon_launcher.php
···225225 echo "Staging launch...\n";
226226 $control->pingConduit();
227227 if ($with_logs) {
228228- $log_dir = $control->getControlDirectory('log').'/daemons.log';
228228+ $log_dir = $control->getLogDirectory().'/daemons.log';
229229 echo "NOTE: Logs will appear in '{$log_dir}'.\n\n";
230230 }
231231}
···254254 $flags[] = csprintf('--conduit-uri=%s', PhabricatorEnv::getURI('/api/'));
255255256256 if (!$debug) {
257257- $log_dir = $this->getControlDirectory('log').'/daemons.log';
258258- $flags[] = csprintf('--log=%s', $log_dir);
257257+ $log_file = $this->getLogDirectory().'/daemons.log';
258258+ $flags[] = csprintf('--log=%s', $log_file);
259259 }
260260261261- $pid_dir = $this->getControlDirectory('pid');
261261+ $pid_dir = $this->getPIDDirectory();
262262263263 // TODO: This should be a much better user experience.
264264 Filesystem::assertExists($pid_dir);
···295295 return;
296296 }
297297298298- public function getControlDirectory($dir) {
299299- $path = PhabricatorEnv::getEnvConfig('phd.pid-directory').'/'.$dir;
298298+ private function getControlDirectory($path) {
300299 if (!Filesystem::pathExists($path)) {
301300 list($err) = exec_manual('mkdir -p %s', $path);
302301 if ($err) {
303302 throw new Exception(
304303 "phd requires the directory '{$path}' to exist, but it does not ".
305304 "exist and could not be created. Create this directory or update ".
306306- "'phd.pid-directory' in your configuration to point to an existing ".
307307- "directory.");
305305+ "'phd.pid-directory' / 'phd.log-directory' in your configuration ".
306306+ "to point to an existing directory.");
308307 }
309308 }
310309 return $path;
311310 }
312311312312+ public function getPIDDirectory() {
313313+ $path = PhabricatorEnv::getEnvConfig('phd.pid-directory');
314314+ return $this->getControlDirectory($path);
315315+ }
316316+317317+ public function getLogDirectory() {
318318+ $path = PhabricatorEnv::getEnvConfig('phd.log-directory');
319319+ return $this->getControlDirectory($path);
320320+ }
321321+313322 protected function loadAvailableDaemonClasses() {
314323 $loader = new PhutilSymbolLoader();
315324 return $loader
···321330 public function loadRunningDaemons() {
322331 $results = array();
323332324324- $pid_dir = $this->getControlDirectory('pid');
333333+ $pid_dir = $this->getPIDDirectory();
325334 $pid_files = Filesystem::listDirectory($pid_dir);
326335 if (!$pid_files) {
327336 return $results;