public function __construct($title, $params)
 {
     parent::__construct($title, $params);
     if ($this->isPrioritized()) {
         $this->command .= 'Prioritized';
     }
     // Note that we have to keep the prioritized param or else when the job
     // is loaded it'll load under a different name/command/type which would
     // be confusing.
 }
 public function __construct($title, $params)
 {
     $params += array('cluster' => null);
     // eg: DeletePages -> cirrusSearchDeletePages
     $jobName = 'cirrusSearch' . str_replace('CirrusSearch\\Job\\', '', get_class($this));
     parent::__construct($jobName, $title, $params);
     // All CirrusSearch jobs are reasonably expensive.  Most involve parsing and it
     // is ok to remove duplicate _unclaimed_ cirrus jobs.  Once a cirrus job is claimed
     // it can't be deduplicated or else the search index will end up with out of date
     // data.  Luckily, this is how the JobQueue implementations work.
     $this->removeDuplicates = true;
     $config = ConfigFactory::getDefaultInstance()->makeConfig('CirrusSearch');
     // When the 'cluster' parameter is provided the job must only operate on
     // the specified cluster, take special care to ensure nested jobs get the
     // correct cluster set.  When set to null all clusters should be written to.
     $this->connection = Connection::getPool($config, $params['cluster']);
 }
 /**
  * @param Title $title A mediawiki title related to the job
  * @param array $params
  */
 public function __construct($title, $params)
 {
     parent::__construct($title, $params + array('createdAt' => time(), 'errorCount' => 0, 'cluster' => null));
 }