Page MenuHomePhabricator
Diviner Phabricator Tech Docs PhabricatorWorkerTrigger

final class PhabricatorWorkerTrigger
Phabricator Technical Documentation (Daemons)

This class is not documented.

Tasks

Configuring Storage

Other Methods

Methods

public static function pushStorageNamespace($namespace)
Inherited

This method is not documented.
Parameters
$namespace
Return
wild

public static function popStorageNamespace()
Inherited

This method is not documented.
Return
wild

public static function getDefaultStorageNamespace()
Inherited

This method is not documented.
Return
wild

public static function getStorageNamespace()
Inherited

This method is not documented.
Return
wild

public function setForcedStorageNamespace($namespace)
Inherited

This method is not documented.
Parameters
$namespace
Return
wild

protected function establishLiveConnection($mode)
Inherited

This method is not documented.
Parameters
$mode
Return
wild

private function newClusterConnection($application, $database, $mode)
Inherited

This method is not documented.
Parameters
$application
$database
$mode
Return
wild

private function raiseImproperWrite($database)
Inherited

This method is not documented.
Parameters
$database
Return
wild

private function raiseImpossibleWrite($database)
Inherited

This method is not documented.
Parameters
$database
Return
wild

private function raiseUnconfigured($database)
Inherited

This method is not documented.
Parameters
$database
Return
wild

private function raiseUnreachable($database, $proxy)
Inherited

This method is not documented.
Parameters
$database
Exception$proxy
Return
wild

public function getTableName()
Inherited

This method is not documented.
Return
wild

public function getApplicationName()
Inherited

This method is not documented.
Return
wild

protected function getDatabaseName()
Inherited

This method is not documented.
Return
wild

public static function chunkSQL($fragments, $limit)
Inherited

PhabricatorLiskDAO

Break a list of escaped SQL statement fragments (e.g., VALUES lists for INSERT, previously built with qsprintf()) into chunks which will fit under the MySQL 'max_allowed_packet' limit.

If a statement is too large to fit within the limit, it is broken into its own chunk (but might fail when the query executes).

Parameters
array$fragments
$limit
Return
wild

protected function assertAttached($property)
Inherited

This method is not documented.
Parameters
$property
Return
wild

protected function assertAttachedKey($value, $key)
Inherited

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

protected function detectEncodingForStorage($string)
Inherited

This method is not documented.
Parameters
$string
Return
wild

protected function getUTF8StringFromStorage($string, $encoding)
Inherited

This method is not documented.
Parameters
$string
$encoding
Return
wild

protected function willReadData(&$data)
Inherited

This method is not documented.
Parameters
array&$data
Return
wild

protected function willWriteData(&$data)
Inherited

This method is not documented.
Parameters
array&$data
Return
wild

protected function getConfiguration()

This method is not documented.
Return
wild

public function save()

This method is not documented.
Return
wild

public function generatePHID()

This method is not documented.
Return
wild

public function getNextEventEpoch($last_epoch, $is_reschedule)

Return the next time this trigger should execute.

This method can be called either after the daemon executed the trigger successfully (giving the trigger an opportunity to reschedule itself into the future, if it is a recurring event) or after the trigger itself is changed (usually because of an application edit). The $is_reschedule parameter distinguishes between these cases.

Parameters
int|null$last_epochEpoch of the most recent successful event execution.
bool$is_reschedule`true` if we're trying to reschedule the event after execution; `false` if this is in response to a trigger update.
Return
int|nullReturn an epoch to schedule the next event execution, or `null` to stop the event from executing again.

public function executeTrigger($last_event, $this_event)

Execute the event.

Parameters
int|null$last_eventEpoch of previous execution, or null if this is the first execution.
int$this_eventScheduled epoch of this execution. This may not be the same as the current time.
Return
void

public function getEvent()

This method is not documented.
Return
wild

public function attachEvent($event)

This method is not documented.
Parameters
PhabricatorWorkerTriggerEvent$event
Return
wild

public function setAction($action)

This method is not documented.
Parameters
PhabricatorTriggerAction$action
Return
wild

public function getAction()

This method is not documented.
Return
wild

public function attachAction($action)

This method is not documented.
Parameters
PhabricatorTriggerAction$action
Return
wild

public function setClock($clock)

This method is not documented.
Parameters
PhabricatorTriggerClock$clock
Return
wild

public function getClock()

This method is not documented.
Return
wild

public function attachClock($clock)

This method is not documented.
Parameters
PhabricatorTriggerClock$clock
Return
wild

public function getNextEventPrediction()

Predict the epoch at which this trigger will next fire.

Return
int|nullEpoch when the event will next fire, or `null` if it is not planned to trigger.

public function destroyObjectPermanently($engine)

This method is not documented.
Parameters
PhabricatorDestructionEngine$engine
Return
wild

public function getCapabilities()

This method is not documented.
Return
wild

public function getPolicy($capability)

This method is not documented.
Parameters
$capability
Return
wild

public function hasAutomaticCapability($capability, $viewer)

This method is not documented.
Parameters
$capability
PhabricatorUser$viewer
Return
wild