Page MenuHomeIsabelle/Phabricator
Diviner Phabricator Tech Docs PhabricatorRepositoryPullLocalDaemon

final class PhabricatorRepositoryPullLocalDaemon
Phabricator 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

Pulling Repositories

Other Methods

Methods

protected function willRun()
Inherited

This method is not documented.
Return
wild

protected function willSleep($duration)
Inherited

This method is not documented.
Parameters
$duration
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.

protected function run()

This method is not documented.
Return
wild

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