Inherited by DoubleRedirectJob, EmaillingJob, EnotifNotifyJob, HTMLCacheUpdateJob, RefreshLinksJob, and RefreshLinksJob2.
Public Member Functions | |
run () | |
Run the job. | |
__construct ($command, $title, $params=false, $id=0) | |
insert () | |
Insert a single job into the queue. | |
toString () | |
getLastError () | |
Static Public Member Functions | |
static | pop_type ($type) |
static function queueLinksJobs( $titles ) {} | |
static | pop ($offset=0) |
Pop a job off the front of the queue. | |
static | factory ($command, $title, $params=false, $id=0) |
Create the appropriate object to handle a specific job. | |
static | makeBlob ($params) |
static | extractBlob ($blob) |
static | batchInsert ($jobs) |
Batch-insert a group of jobs into the queue. | |
Public Attributes | |
$command | |
$title | |
$params | |
$id | |
$removeDuplicates | |
$error | |
Protected Member Functions | |
insertFields () | |
setLastError ($error) |
Definition at line 15 of file JobQueue.php.
Job::__construct | ( | $ | command, | |
$ | title, | |||
$ | params = false , |
|||
$ | id = 0 | |||
) |
static Job::batchInsert | ( | $ | jobs | ) | [static] |
Batch-insert a group of jobs into the queue.
This will be wrapped in a transaction with a forced commit.
This may add duplicate at insert time, but they will be removed later on, when the first one is popped.
$jobs | array of Job objects |
Definition at line 218 of file JobQueue.php.
References $dbw, $job, $rows, and wfGetDB().
Referenced by DoubleRedirectJob::fixRedirects(), HTMLCacheUpdate::insertJobs(), LinksUpdate::queueRecursiveJobs(), and RefreshLinksJob2::run().
static Job::extractBlob | ( | $ | blob | ) | [static] |
static Job::factory | ( | $ | command, | |
$ | title, | |||
$ | params = false , |
|||
$ | id = 0 | |||
) | [static] |
Create the appropriate object to handle a specific job.
$command | String: Job command | |
$title | Title: Associated title | |
$params | Array: Job parameters | |
$id | Int: Job identifier |
Definition at line 184 of file JobQueue.php.
References $command, $id, $params, $title, and $wgJobClasses.
Referenced by pop(), pop_type(), and MWGearmanJob::runNoSwitch().
Job::getLastError | ( | ) |
Definition at line 309 of file JobQueue.php.
Job::insert | ( | ) |
Insert a single job into the queue.
Definition at line 259 of file JobQueue.php.
References $dbw, $fields, $res, insertFields(), and wfGetDB().
Job::insertFields | ( | ) | [protected] |
static Job::makeBlob | ( | $ | params | ) | [static] |
static Job::pop | ( | $ | offset = 0 |
) | [static] |
Pop a job off the front of the queue.
$offset | Number of jobs to skip |
Definition at line 90 of file JobQueue.php.
References $affected, $dbr, $dbw, $job, $offset, $row, $title, extractBlob(), factory(), Title::makeTitleSafe(), wfGetDB(), wfProfileIn(), and wfProfileOut().
Referenced by MediaWiki::doJobs().
static Job::pop_type | ( | $ | type | ) | [static] |
static function queueLinksJobs( $titles ) {}
Pop a job of a certain type. This tries less hard than pop() to actually find a job; it may be adversely affected by concurrent job runners.
Definition at line 49 of file JobQueue.php.
References $affected, $dbw, $job, $row, $title, $type, extractBlob(), factory(), Title::makeTitleSafe(), wfGetDB(), and wfProfileOut().
Job::run | ( | ) | [abstract] |
Run the job.
Reimplemented in DoubleRedirectJob, EmaillingJob, EnotifNotifyJob, HTMLCacheUpdateJob, RefreshLinksJob, and RefreshLinksJob2.
Job::setLastError | ( | $ | error | ) | [protected] |
Definition at line 305 of file JobQueue.php.
References $error.
Referenced by DoubleRedirectJob::run().
Job::toString | ( | ) |
Job::$command |
Job::$error |
Job::$id |
Definition at line 16 of file JobQueue.php.
Referenced by RefreshLinksJob2::__construct(), RefreshLinksJob::__construct(), __construct(), HTMLCacheUpdateJob::__construct(), EnotifNotifyJob::__construct(), EmaillingJob::__construct(), DoubleRedirectJob::__construct(), and factory().
Job::$params |
Definition at line 16 of file JobQueue.php.
Referenced by RefreshLinksJob2::__construct(), RefreshLinksJob::__construct(), __construct(), HTMLCacheUpdateJob::__construct(), EnotifNotifyJob::__construct(), EmaillingJob::__construct(), DoubleRedirectJob::__construct(), factory(), and makeBlob().
Job::$removeDuplicates |
Definition at line 16 of file JobQueue.php.
Job::$title |
Definition at line 16 of file JobQueue.php.
Referenced by RefreshLinksJob2::__construct(), RefreshLinksJob::__construct(), __construct(), HTMLCacheUpdateJob::__construct(), EnotifNotifyJob::__construct(), DoubleRedirectJob::__construct(), factory(), DoubleRedirectJob::fixRedirects(), DoubleRedirectJob::getFinalDestination(), pop(), pop_type(), and RefreshLinksJob2::run().