Page MenuHomePhorge
Diviner Tech Docs PhabricatorRepositoryPullLocalDaemon

final class PhabricatorRepositoryPullLocalDaemon
Phorge Technical Documentation (Repositories)

Run pull commands on local working copies to keep them up to date. This daemon handles all repository types.

By default, the daemon pulls every repository. If you want it to be responsible for only some repositories, you can launch it with a list of repositories:

./phd launch repositorypulllocal -- X Q Z

You can also launch a daemon which is responsible for all but one or more repositories:

./phd launch repositorypulllocal -- --not A --not B

If you have a very large number of repositories and some aren't being pulled as frequently as you'd like, you can either change the pull frequency of the less-important repositories to a larger number (so the daemon will skip them more often) or launch one daemon for all the less-important repositories and one for the more important repositories (or one for each more important repository).

Tasks

Communicating With the Overseer

No methods for this task.

Autoscaling Daemon Pools

  • protected function willBeginWork() — Prepare to become busy. This may autoscale the pool up.
  • protected function willBeginIdle() — Prepare to idle. This may autoscale the pool down.

Pulling Repositories

Other Methods

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

final public function setVerbose($verbose)
Inherited

This method is not documented.
Parameters
$verbose
Return
wild

final public function getVerbose()
Inherited

This method is not documented.
Return
wild

final public function setScaledownDuration($scaledown_duration)
Inherited

This method is not documented.
Parameters
$scaledown_duration
Return
wild

final public function getScaledownDuration()
Inherited

This method is not documented.
Return
wild

final public function __construct($argv)
Inherited

This method is not documented.
Parameters
array$argv
Return
this//Implicit.//

final public function __destruct()
Inherited

This method is not documented.
Return
wild

final public function stillWorking()
Inherited

This method is not documented.
Return
wild

final public function shouldExit()
Inherited

This method is not documented.
Return
wild

final protected function shouldHibernate($duration)
Inherited

This method is not documented.
Parameters
$duration
Return
wild

final protected function sleep($duration)
Inherited

This method is not documented.
Parameters
$duration
Return
wild

protected function willSleep($duration)
Inherited

This method is not documented.
Parameters
$duration
Return
wild

public static function onTermSignal($signo)
Inherited

This method is not documented.
Parameters
$signo
Return
wild

final protected function getArgv()
Inherited

This method is not documented.
Return
wild

final public function execute()
Inherited

This method is not documented.
Return
wild

protected function run()

This method is not documented.
Return
wild

final public function setTraceMemory()
Inherited

This method is not documented.
Return
wild

final public function getTraceMemory()
Inherited

This method is not documented.
Return
wild

final public function setTraceMode()
Inherited

This method is not documented.
Return
wild

final public function getTraceMode()
Inherited

This method is not documented.
Return
wild

final public function onGracefulSignal($signo)
Inherited

This method is not documented.
Parameters
$signo
Return
wild

final public function onNotifySignal($signo)
Inherited

This method is not documented.
Parameters
$signo
Return
wild

protected function onNotify($signo)
Inherited

This method is not documented.
Parameters
$signo
Return
wild

protected function willRun()
Inherited

This method is not documented.
Return
wild

protected function didSetTraceMode()
Inherited

This method is not documented.
Return
wild

final protected function log($message)
Inherited

This method is not documented.
Parameters
$message
Return
wild

private static function didCatchSignal($signo)
Inherited

This method is not documented.
Parameters
$signo
Return
wild

private function beginStdoutCapture()
Inherited

This method is not documented.
Return
wild

private function endStdoutCapture()
Inherited

This method is not documented.
Return
wild

public function didReceiveStdout($data)
Inherited

This method is not documented.
Parameters
$data
Return
wild

private function encodeOverseerMessage($type, $data)
Inherited

This method is not documented.
Parameters
$type
$data
Return
wild

private function emitOverseerMessage($type, $data)
Inherited

This method is not documented.
Parameters
$type
$data
Return
wild

public static function errorListener($event, $value, $metadata)
Inherited

This method is not documented.
Parameters
$event
$value
array$metadata
Return
wild

protected function willBeginWork()
Inherited

PhutilDaemon

Prepare to become busy. This may autoscale the pool up.

This notifies the overseer that the daemon has become busy. If daemons that are part of an autoscale pool are continuously busy for a prolonged period of time, the overseer may scale up the pool.

Return
this

protected function willBeginIdle()
Inherited

PhutilDaemon

Prepare to idle. This may autoscale the pool down.

This notifies the overseer that the daemon is no longer busy. If daemons that are part of an autoscale pool are idle for a prolonged period of time, they may exit to scale the pool down.

Return
this

protected function getIdleDuration()
Inherited

This method is not documented.
Return
wild

public function getViewer()
Inherited

This method is not documented.
Return
wild

public static function sudoCommandAsDaemonUser($command)
Inherited

PhabricatorDaemon

Format a command so it executes as the daemon user, if a daemon user is defined. This wraps the provided command in sudo -u ..., roughly.

Parameters
PhutilCommandString$commandCommand to execute.
Return
PhutilCommandString`sudo` version of the command.

private function buildUpdateFuture($repository, $no_discovery)

This method is not documented.
Parameters
PhabricatorRepository$repository
$no_discovery
Return
wild

private function loadRepositoryUpdateMessages($consume)

Check for repositories that should be updated immediately.

With the $consume flag, an internal cursor will also be incremented so that these messages are not returned by subsequent calls.

Parameters
bool$consumePass `true` to consume these messages, so the process will not see them again.
Return
list<wild>Pending update messages.

private function loadLastUpdate($repository)

This method is not documented.
Parameters
PhabricatorRepository$repository
Return
wild

private function loadPullableRepositories($include, $exclude, $device)

This method is not documented.
Parameters
array$include
array$exclude
AlmanacDevice$device
Return
wild

private function resolveUpdateFuture($repository, $future, $min_sleep)

This method is not documented.
Parameters
PhabricatorRepository$repository
ExecFuture$future
$min_sleep
Return
wild

private function waitForUpdates($min_sleep, $retry_after)

Sleep for a short period of time, waiting for update messages from the

Parameters
$min_sleep
array$retry_after
Return
wild

private function loadUnsynchronizedRepositories($device)

This method is not documented.
Parameters
AlmanacDevice$device
Return
wild