55 parent::__construct(
'null', $params );
56 if ( !isset( $this->params[
'lives'] ) ) {
57 $this->params[
'lives'] = 1;
59 if ( !isset( $this->params[
'usleep'] ) ) {
60 $this->params[
'usleep'] = 0;
62 $this->removeDuplicates = !empty( $this->params[
'removeDuplicates'] );
65 public function run() {
66 if ( $this->params[
'usleep'] > 0 ) {
67 usleep( $this->params[
'usleep'] );
69 if ( $this->params[
'lives'] > 1 ) {
73 MediaWikiServices::getInstance()->getJobQueueGroup()->push(
$job );
Class to both describe a background job and handle jobs.
array $params
Array of job parameters.
No-op job that does nothing.
__construct(array $params)
Interface for generic jobs only uses the parameters field and are JSON serializable.
if(count( $args)< 1) $job