コード例 #1
0
 /**
  * Construct a job
  * @param $title Title: the title linked to
  * @param $params Array: job parameters (table, start and end page_ids)
  * @param $id Integer: job id
  */
 function __construct($title, $params, $id = 0)
 {
     parent::__construct('htmlCacheUpdate', $title, $params, $id);
     $this->table = $params['table'];
     $this->start = $params['start'];
     $this->end = $params['end'];
 }
コード例 #2
0
 public function __construct(Title $title, array $params)
 {
     parent::__construct('categoryMembershipChange', $title, $params);
     // Only need one job per page. Note that ENQUEUE_FUDGE_SEC handles races where an
     // older revision job gets inserted while the newer revision job is de-duplicated.
     $this->removeDuplicates = true;
 }
コード例 #3
0
 function __construct(&$uptitle, $params, $id = 0)
 {
     $this->updatetitle = $uptitle;
     $this->oldtitle = $params[0];
     $this->newtitle = $params[1];
     parent::__construct(get_class($this), $uptitle, $params, $id);
 }
コード例 #4
0
 /**
  * Creates a NMSendMailJob
  *
  * @param Title $title
  */
 function __construct($title, $params)
 {
     wfDebug(__METHOD__ . " " . get_class($this) . " \r\n");
     wfProfileIn(__METHOD__);
     parent::__construct(get_class($this), Title::newMainPage(), $params);
     wfProfileOut(__METHOD__);
 }
コード例 #5
0
 public function __construct()
 {
     parent::__construct($name, $age, $title, $salary, $description, $man, $genre, $pop = 0);
     $this->manager = $man;
     $this->music_genre = $genre;
     $this->popularity = $pop;
 }
コード例 #6
0
 function __construct($title, $params = false, $id = 0)
 {
     parent::__construct('fixDoubleRedirect', $title, $params, $id);
     $this->reason = $params['reason'];
     $this->redirTitle = Title::newFromText($params['redirTitle']);
     $this->destTitleText = !empty($params['destTitle']) ? $params['destTitle'] : '';
 }
コード例 #7
0
 function __construct(Title $title, array $params)
 {
     parent::__construct('activityUpdateJob', $title, $params);
     if (!isset($params['type'])) {
         throw new InvalidArgumentException("Missing 'type' parameter.");
     }
     $this->removeDuplicates = true;
 }
コード例 #8
0
 function __construct($title, $params)
 {
     parent::__construct(__CLASS__, $title, $params);
     // If there is already a job with the same params, this job will be ignored
     // for example, if there is a page link bundle notification job for article A
     // created by user B, any subsequent jobs with the same data will be ignored
     $this->removeDuplicates = true;
 }
コード例 #9
0
 function __construct(Title $title, array $params)
 {
     parent::__construct('recentChangesUpdate', $title, $params);
     if (!isset($params['type'])) {
         throw new Exception("Missing 'type' parameter.");
     }
     $this->removeDuplicates = true;
 }
コード例 #10
0
 /**
  * Construct a job
  * @param $title Title: the title linked to
  * @param array $params job parameters (table, start and end page_ids)
  * @param $id Integer: job id
  */
 function __construct($title, $params, $id = 0)
 {
     global $wgUpdateRowsPerJob, $wgUpdateRowsPerQuery;
     parent::__construct('htmlCacheUpdate', $title, $params, $id);
     $this->rowsPerJob = $wgUpdateRowsPerJob;
     $this->rowsPerQuery = $wgUpdateRowsPerQuery;
     $this->blCache = $title->getBacklinkCache();
 }
コード例 #11
0
 public function __construct($title, $params)
 {
     parent::__construct($title, $params);
     // This is one of the cheapest jobs we have. Plus I'm reasonably
     // paranoid about deletions so I'd rather delete things extra times
     // if something actually requested it.
     $this->removeDuplicates = false;
 }
コード例 #12
0
ファイル: NullJob.php プロジェクト: nischayn22/mediawiki-core
 /**
  * @param $title Title (can be anything)
  * @param $params Array: job parameters (lives, usleep)
  * @param $id Integer: job id
  */
 function __construct($title, $params, $id = 0)
 {
     parent::__construct('null', $title, $params, $id);
     if (!isset($this->params['lives'])) {
         $this->params['lives'] = 1;
     }
     if (!isset($this->params['usleep'])) {
         $this->params['usleep'] = 0;
     }
 }
コード例 #13
0
ファイル: JobUser.php プロジェクト: dautushenka/Job_Centre
 public function __construct($job_cfg, $lang_job, &$dbase)
 {
     parent::__construct($job_cfg, $lang_job, $dbase);
     $this->PreparationSearchArray();
     if (!empty($_COOKIE['favorites_vacancy'])) {
         $this->favorites['vacancy'] = explode(",", $_COOKIE['favorites_vacancy']);
     }
     if (!empty($_COOKIE['favorites_resume'])) {
         $this->favorites['resume'] = explode(",", $_COOKIE['favorites_resume']);
     }
 }
コード例 #14
0
 public function __construct($id = null, $status = null, $history = null, $failureReason = null, $stats = null, $billingSummary = null, $JobType = null)
 {
     parent::__construct();
     $this->id = $id;
     $this->status = $status;
     $this->history = $history;
     $this->failureReason = $failureReason;
     $this->stats = $stats;
     $this->billingSummary = $billingSummary;
     $this->JobType = $JobType;
 }
コード例 #15
0
ファイル: NullJob.php プロジェクト: paladox/mediawiki
 /**
  * @param Title $title
  * @param array $params Job parameters (lives, usleep)
  */
 function __construct(Title $title, array $params)
 {
     parent::__construct('null', $title, $params);
     if (!isset($this->params['lives'])) {
         $this->params['lives'] = 1;
     }
     if (!isset($this->params['usleep'])) {
         $this->params['usleep'] = 0;
     }
     $this->removeDuplicates = !empty($this->params['removeDuplicates']);
 }
コード例 #16
0
 public function __construct($jid, $callback = null)
 {
     if (!is_callable($callback) && !is_null($callback)) {
         throw new \InvalidArgumentException('CallbackJob constructor arguments type error');
     }
     parent::__construct($jid);
     if ($callback) {
         $this->callback = $callback;
     } else {
         $this->callback = function () {
         };
     }
 }
コード例 #17
0
ファイル: RefreshLinksJob.php プロジェクト: sftsk/mediawiki
 function __construct(Title $title, array $params)
 {
     parent::__construct('refreshLinks', $title, $params);
     // Base backlink update jobs and per-title update jobs can be de-duplicated.
     // If template A changes twice before any jobs run, a clean queue will have:
     // 		(A base, A base)
     // The second job is ignored by the queue on insertion.
     // Suppose, many pages use template A, and that template itself uses template B.
     // An edit to both will first create two base jobs. A clean FIFO queue will have:
     // 		(A base, B base)
     // When these jobs run, the queue will have per-title and remnant partition jobs:
     // 		(titleX,titleY,titleZ,...,A remnant,titleM,titleN,titleO,...,B remnant)
     // Some these jobs will be the same, and will automatically be ignored by
     // the queue upon insertion. Some title jobs will run before the duplicate is
     // inserted, so the work will still be done twice in those cases. More titles
     // can be de-duplicated as the remnant jobs continue to be broken down. This
     // works best when $wgUpdateRowsPerJob, and either the pages have few backlinks
     // and/or the backlink sets for pages A and B are almost identical.
     $this->removeDuplicates = !isset($params['range']) && (!isset($params['pages']) || count($params['pages']) == 1);
 }
コード例 #18
0
ファイル: HAWelcome.php プロジェクト: schwarer2006/wikia
 /**
  * Construct a job
  *
  * @param Title $title The title linked to
  * @param array $params Job parameters (table, start and end page_ids)
  * @param integer $id job_id
  */
 public function __construct($title, $params, $id = 0)
 {
     parent::__construct("HAWelcome", $title, $params, $id);
     $this->mUserId = $params["user_id"];
     $this->mUserIP = $params["user_ip"];
     $this->mUserName = $params["user_name"];
     $this->mAnon = (bool) $params["is_anon"];
     $this->mSysop = false;
     if ($this->mAnon) {
         $this->mUser = User::newFromName($this->mUserIP, false);
     } else {
         $this->mUser = User::newFromId($this->mUserId);
     }
     /**
      * fallback
      */
     if (!$this->mUser) {
         $this->mUser = User::newFromName($this->mUserName);
     }
 }
コード例 #19
0
 /**
  * @param  $title
  * @param  $params
  */
 public function __construct($title, $params)
 {
     // Replace synchroniseThreadArticleData with the an identifier for your job.
     parent::__construct('addDNSHostToLDAP', $title, $params);
 }
コード例 #20
0
 /**
  * Construct a thumbnail job
  *
  * @param $title Title Title object
  * @param $params array Associative array of options:
  *     page:           page number for which the thumbnail will be created
  *     jobtype:        CreatePDFThumbnailsJob::BIG_THUMB or CreatePDFThumbnailsJob::SMALL_THUMB
  *                     BIG_THUMB will create a thumbnail visible for full thumbnail view,
  *                     SMALL_THUMB will create a thumbnail shown in "previous page"/"next page" boxes
  * 
  */
 public function __construct($title, $params)
 {
     parent::__construct('createPdfThumbnailsJob', $title, $params);
 }
コード例 #21
0
ファイル: RefreshLinksJob.php プロジェクト: mangowi/mediawiki
 function __construct($title, $params, $id = 0)
 {
     parent::__construct('refreshLinks2', $title, $params, $id);
 }
コード例 #22
0
 public function __construct($id = null, $policy = null, $request = null, $status = null, $history = null, $result = null, $numRequestParts = null, $numRequestPartsReceived = null, $failureReason = null, $stats = null, $billingSummary = null, $JobType = null)
 {
     parent::__construct();
     $this->id = $id;
     $this->policy = $policy;
     $this->request = $request;
     $this->status = $status;
     $this->history = $history;
     $this->result = $result;
     $this->numRequestParts = $numRequestParts;
     $this->numRequestPartsReceived = $numRequestPartsReceived;
     $this->failureReason = $failureReason;
     $this->stats = $stats;
     $this->billingSummary = $billingSummary;
     $this->JobType = $JobType;
 }
コード例 #23
0
 function __construct($title, $params, $id = 0)
 {
     parent::__construct('enotifNotify', $title, $params, $id);
 }
コード例 #24
0
 public function __construct($id = NULL, $policy = NULL, $request = NULL, $status = NULL, $history = NULL, $result = NULL, $numRequestParts = NULL, $numRequestPartsReceived = NULL, $customerJobKey = NULL, $failureReason = NULL, $stats = NULL, $billingSummary = NULL, $JobType = NULL)
 {
     if (get_parent_class('BulkMutateJob')) {
         parent::__construct();
     }
     $this->id = $id;
     $this->policy = $policy;
     $this->request = $request;
     $this->status = $status;
     $this->history = $history;
     $this->result = $result;
     $this->numRequestParts = $numRequestParts;
     $this->numRequestPartsReceived = $numRequestPartsReceived;
     $this->customerJobKey = $customerJobKey;
     $this->failureReason = $failureReason;
     $this->stats = $stats;
     $this->billingSummary = $billingSummary;
     $this->JobType = $JobType;
 }
コード例 #25
0
 public function __construct($title, $params)
 {
     parent::__construct($title, $params);
 }
コード例 #26
0
 /**
  * Construct a job
  * @param Title $title The title linked to
  * @param string $table The name of the link table.
  * @param integer $start Beginning page_id or false for open interval
  * @param integer $end End page_id or false for open interval
  * @param integer $id job_id
  */
 function __construct($title, $table, $start, $end, $id = 0)
 {
     $params = array('table' => $table, 'start' => $start, 'end' => $end);
     parent::__construct('htmlCacheUpdate', $title, $params, $id);
     $this->table = $table;
     $this->start = intval($start);
     $this->end = intval($end);
 }
コード例 #27
0
 public function __construct(Title $title, array $params)
 {
     parent::__construct('AssembleUploadChunks', $title, $params);
     $this->removeDuplicates = true;
 }
コード例 #28
0
 public function __construct($title, $params, $id = 0)
 {
     parent::__construct('AssembleUploadChunks', $title, $params, $id);
     $this->removeDuplicates = true;
 }
 public function __construct($title, $params)
 {
     parent::__construct('purgeDependentWikis', $title, $params);
 }
コード例 #30
0
 /**
  * Callers should use DuplicateJob::newFromJob() instead
  *
  * @param Title $title
  * @param array $params job parameters
  */
 function __construct($title, $params)
 {
     parent::__construct('duplicate', $title, $params);
 }