MediaWiki
1.23.2
|
Job queue task description base code. More...
Public Member Functions | |
__construct ( $type, array $params, array $opts=array(), Title $title=null) | |
getDeduplicationInfo () | |
Subclasses may need to override this to make duplication detection work. More... | |
getParams () | |
getReleaseTimestamp () | |
getTitle () | |
getType () | |
ignoreDuplicates () | |
Protected Member Functions | |
validateParams (array $params) | |
Protected Attributes | |
bool | $ignoreDuplicates |
Expensive jobs may set this to true *. More... | |
array | $params |
Array of job parameters or false if none *. More... | |
Title | $title |
string | $type |
Job queue task description base code.
Example usage: $job = new JobSpecification( 'null', array( 'lives' => 1, 'usleep' => 100, 'pi' => 3.141569 ), array( 'removeDuplicates' => 1 ), Title::makeTitle( NS_SPECIAL, 'nullity' ) ); JobQueueGroup::singleton()->push( $job )
Definition at line 84 of file JobSpecification.php.
string | $type | |
array | $params | Map of key/values |
array | $opts | Map of key/values |
Title | $title | Optional descriptive title |
Definition at line 99 of file JobSpecification.php.
References $params, $type, ignoreDuplicates(), Title\newMainPage(), title, type, and validateParams().
JobSpecification::getDeduplicationInfo | ( | ) |
Subclasses may need to override this to make duplication detection work.
The resulting map conveys everything that makes the job unique. This is only checked if ignoreDuplicates() returns true, meaning that duplicate jobs are supposed to be ignored.
Implements IJobSpecification.
Definition at line 168 of file JobSpecification.php.
References array(), getParams(), getTitle(), and getType().
JobSpecification::getParams | ( | ) |
Implements IJobSpecification.
Definition at line 140 of file JobSpecification.php.
References $params.
Referenced by getDeduplicationInfo().
JobSpecification::getReleaseTimestamp | ( | ) |
Implements IJobSpecification.
Definition at line 147 of file JobSpecification.php.
References TS_UNIX, and wfTimestampOrNull().
JobSpecification::getTitle | ( | ) |
Implements IJobSpecification.
Definition at line 133 of file JobSpecification.php.
References $title.
Referenced by getDeduplicationInfo().
JobSpecification::getType | ( | ) |
Implements IJobSpecification.
Definition at line 126 of file JobSpecification.php.
References $type.
Referenced by getDeduplicationInfo().
JobSpecification::ignoreDuplicates | ( | ) |
Implements IJobSpecification.
Definition at line 156 of file JobSpecification.php.
References $ignoreDuplicates.
Referenced by __construct().
|
protected |
array | $params |
Definition at line 113 of file JobSpecification.php.
Referenced by __construct().
|
protected |
Expensive jobs may set this to true *.
Definition at line 91 of file JobSpecification.php.
Referenced by ignoreDuplicates().
|
protected |
Array of job parameters or false if none *.
Definition at line 87 of file JobSpecification.php.
Referenced by __construct(), getParams(), and validateParams().
|
protected |
|
protected |