53 parent::__construct(
'null', $title,
$params );
54 if ( !isset( $this->params[
'lives'] ) ) {
55 $this->params[
'lives'] = 1;
57 if ( !isset( $this->params[
'usleep'] ) ) {
58 $this->params[
'usleep'] = 0;
60 $this->removeDuplicates = !empty( $this->params[
'removeDuplicates'] );
63 public function run() {
64 if ( $this->params[
'usleep'] > 0 ) {
65 usleep( $this->params[
'usleep'] );
67 if ( $this->params[
'lives'] > 1 ) {
71 JobQueueGroup::singleton()->push(
$job );
Class to both describe a background job and handle jobs.
array $params
Array of job parameters.
Degenerate job that does nothing, but can optionally replace itself in the queue and/or sleep for a b...
__construct(Title $title, array $params)
Represents a title within MediaWiki.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
if(count( $args)< 1) $job