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 ) {
static singleton( $wiki=false)
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.
if(count( $args)< 1) $job