[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/doorkeeper/worker/ -> DoorkeeperFeedWorker.php (summary)

Publish events (like comments on a revision) to external objects which are linked through Doorkeeper (like a linked JIRA or Asana task). These workers are invoked by feed infrastructure during normal task queue operations. They read feed stories and publish information about them to external systems, generally mirroring comments and updates in Phabricator into remote systems by making API calls.

File Size: 196 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions

  getFeedStory()
  getViewer()
  getPublisher()
  getStoryObject()
  loadPublisher()
  doWork()
  getMaximumRetryCount()
  getWaitBeforeRetry()

Functions
Functions that are not part of a class:

getFeedStory()   X-Ref
Get the @{class:PhabricatorFeedStory} that should be published.

return: PhabricatorFeedStory The story to publish.

getViewer()   X-Ref
Get the viewer for the act of publishing.

NOTE: Publishing currently uses the omnipotent viewer because it depends
on loading external accounts. Possibly we should tailor this. See T3732.
Using the actor for most operations might make more sense.

return: PhabricatorUser Viewer.

getPublisher()   X-Ref
Get the @{class:DoorkeeperFeedStoryPublisher} which handles this object.

return: DoorkeeperFeedStoryPublisher Object publisher.

getStoryObject()   X-Ref
Get the primary object the story is about, like a
@{class:DifferentialRevision} or @{class:ManiphestTask}.

return: object Object which the story is about.

loadPublisher()   X-Ref
Load the @{class:DoorkeeperFeedStoryPublisher} which corresponds to this
object. Publishers provide a common API for pushing object updates into
foreign systems.

return: DoorkeeperFeedStoryPublisher Publisher for the story's object.

doWork()   X-Ref
Doorkeeper workers set up some context, then call
@{method:publishFeedStory}.


getMaximumRetryCount()   X-Ref
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.


getWaitBeforeRetry(PhabricatorWorkerTask $task)   X-Ref
See @{method:getMaximumRetryCount} for a description of Doorkeeper
retry defaults.




Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1