Page MenuHomePhorge
Diviner Tech Docs PhabricatorDaemonOverseerModule

final class PhabricatorDaemonOverseerModule
Phorge Technical Documentation (Daemons)

Overseer module.

The primary purpose of this overseer module is to poll for configuration changes and reload daemons when the configuration changes.

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.

public function shouldReloadDaemons()

PhutilDaemonOverseerModule

This method is used to indicate to the overseer that daemons should reload.

PhabricatorDaemonOverseerModule
This method is not documented.
Return
boolTrue if the daemons should reload, otherwise false.

public function shouldWakePool($pool)
Inherited

PhutilDaemonOverseerModule

Should a hibernating daemon pool be awoken immediately?

Parameters
PhutilDaemonPool$pool
Return
boolTrue to awaken the pool immediately.

public static function getAllModules()
Inherited

This method is not documented.
Return
wild

protected function shouldThrottle($name, $duration)
Inherited

PhutilDaemonOverseerModule

Throttle checks from executing too often.

If you throttle a check like this, it will only execute once every 2.5 seconds:

if ($this->shouldThrottle('some.check', 2.5)) {
  return;
}
Parameters
string$nameThrottle key.
float$durationDuration in seconds.
Return
boolTrue to throttle the check.

private function loadConfigVersion()

Calculate a version number for the current Phabricator configuration.

The version number has no real meaning and does not provide any real indication of whether a configuration entry has been changed. The config version is intended to be a rough indicator that "something has changed", which indicates to the overseer that the daemons should be reloaded.

Return
int

private function updateConfigVersion()

Check and update the configuration version.

Return
boolTrue if the daemons should restart, otherwise false.