abstract protected function publishFeedStory()
Actually publish the feed story. Subclasses will generally make API calls to publish some version of the story into external systems.
void |
abstract public function isEnabled()
Enable or disable the worker. Normally, this checks configuration to see if Phabricator is linked to applicable external systems.
bool | True if this worker should try to publish stories. |
protected function getFeedStory()
Get the PhabricatorFeedStory that should be published.
PhabricatorFeedStory | The story to publish. |
protected function getViewer()
Get the viewer for the act of publishing.
PhabricatorUser | Viewer. |
protected function getPublisher()
Get the DoorkeeperFeedStoryPublisher which handles this object.
DoorkeeperFeedStoryPublisher | Object publisher. |
protected function getStoryObject()
Get the primary object the story is about, like a DifferentialRevision or ManiphestTask.
object | Object which the story is about. |
private function loadPublisher()
Load the DoorkeeperFeedStoryPublisher which corresponds to this object. Publishers provide a common API for pushing object updates into foreign systems.
DoorkeeperFeedStoryPublisher | Publisher for the story's object. |
final protected function doWork()
Doorkeeper workers set up some context, then call publishFeedStory().
wild |
public function getMaximumRetryCount()
By default, Doorkeeper workers perform a small number of retries with exponential backoff. A consideration in this policy is that many of these workers are laden with side effects.
wild |
public function getWaitBeforeRetry($task)
See getMaximumRetryCount() for a description of Doorkeeper retry defaults.
PhabricatorWorkerTask | $task |
wild |