当前位置: 首页>>代码示例>>PHP>>正文


PHP Job::getDeduplicationInfo方法代码示例

本文整理汇总了PHP中Job::getDeduplicationInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Job::getDeduplicationInfo方法的具体用法?PHP Job::getDeduplicationInfo怎么用?PHP Job::getDeduplicationInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Job的用法示例。


在下文中一共展示了Job::getDeduplicationInfo方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getDeduplicationInfo

 public function getDeduplicationInfo()
 {
     $info = parent::getDeduplicationInfo();
     if (is_array($info['params'])) {
         $info['params'] = array('filekey' => $info['params']['filekey']);
     }
     return $info;
 }
开发者ID:mangowi,项目名称:mediawiki,代码行数:8,代码来源:AssembleUploadChunksJob.php

示例2: getDeduplicationInfo

 /**
  * @return Array
  */
 public function getDeduplicationInfo()
 {
     $info = parent::getDeduplicationInfo();
     // Don't let highly unique "masterPos" values ruin duplicate detection
     if (is_array($info['params'])) {
         unset($info['params']['masterPos']);
     }
     return $info;
 }
开发者ID:mangowi,项目名称:mediawiki,代码行数:12,代码来源:RefreshLinksJob.php

示例3: getDeduplicationInfo

 public function getDeduplicationInfo()
 {
     $info = parent::getDeduplicationInfo();
     if (is_array($info['params'])) {
         // Don't let highly unique "masterPos" values ruin duplicate detection
         unset($info['params']['masterPos']);
         // For per-pages jobs, the job title is that of the template that changed
         // (or similar), so remove that since it ruins duplicate detection
         if (isset($info['pages'])) {
             unset($info['namespace']);
             unset($info['title']);
         }
     }
     return $info;
 }
开发者ID:sftsk,项目名称:mediawiki,代码行数:15,代码来源:RefreshLinksJob.php

示例4: getDeduplicationInfo

 public function getDeduplicationInfo()
 {
     $info = parent::getDeduplicationInfo();
     unset($info['params']['revTimestamp']);
     // first job wins
     return $info;
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:7,代码来源:CategoryMembershipChangeJob.php

示例5: insertFields

 /**
  * @param $job Job
  * @return array
  */
 protected function insertFields(Job $job)
 {
     list($dbw, $scope) = $this->getMasterDB();
     return array('job_cmd' => $job->getType(), 'job_namespace' => $job->getTitle()->getNamespace(), 'job_title' => $job->getTitle()->getDBkey(), 'job_params' => self::makeBlob($job->getParams()), 'job_id' => $dbw->nextSequenceValue('job_job_id_seq'), 'job_timestamp' => $dbw->timestamp(), 'job_sha1' => wfBaseConvert(sha1(serialize($job->getDeduplicationInfo())), 16, 36, 31), 'job_random' => mt_rand(0, self::MAX_JOB_RANDOM));
 }
开发者ID:mangowi,项目名称:mediawiki,代码行数:9,代码来源:JobQueueDB.php

示例6: getNewJobFields

 /**
  * @param $job Job
  * @return array
  */
 protected function getNewJobFields(Job $job)
 {
     return array('type' => $job->getType(), 'namespace' => $job->getTitle()->getNamespace(), 'title' => $job->getTitle()->getDBkey(), 'params' => $job->getParams(), 'rtimestamp' => $job->getReleaseTimestamp() ?: 0, 'uuid' => UIDGenerator::newRawUUIDv4(UIDGenerator::QUICK_RAND), 'sha1' => $job->ignoreDuplicates() ? wfBaseConvert(sha1(serialize($job->getDeduplicationInfo())), 16, 36, 31) : '', 'timestamp' => time());
 }
开发者ID:mangowi,项目名称:mediawiki,代码行数:8,代码来源:JobQueueRedis.php

示例7: getNewJobFields

	/**
	 * @param $job Job
	 * @return array
	 */
	protected function getNewJobFields( Job $job ) {
		return array(
			// Fields that describe the nature of the job
			'type'       => $job->getType(),
			'namespace'  => $job->getTitle()->getNamespace(),
			'title'      => $job->getTitle()->getDBkey(),
			'params'     => $job->getParams(),
			// Some jobs cannot run until a "release timestamp"
			'rtimestamp' => $job->getReleaseTimestamp() ?: 0,
			// Additional job metadata
			'uuid'       => UIDGenerator::newRawUUIDv4( UIDGenerator::QUICK_RAND ),
			'sha1'       => $job->ignoreDuplicates()
				? wfBaseConvert( sha1( serialize( $job->getDeduplicationInfo() ) ), 16, 36, 31 )
				: '',
			'timestamp'  => time() // UNIX timestamp
		);
	}
开发者ID:nahoj,项目名称:mediawiki_ynh,代码行数:21,代码来源:JobQueueRedis.php

示例8: insertFields

	/**
	 * @param $job Job
	 * @return array
	 */
	protected function insertFields( Job $job ) {
		$dbw = $this->getMasterDB();
		return array(
			// Fields that describe the nature of the job
			'job_cmd'       => $job->getType(),
			'job_namespace' => $job->getTitle()->getNamespace(),
			'job_title'     => $job->getTitle()->getDBkey(),
			'job_params'    => self::makeBlob( $job->getParams() ),
			// Additional job metadata
			'job_id'        => $dbw->nextSequenceValue( 'job_job_id_seq' ),
			'job_timestamp' => $dbw->timestamp(),
			'job_sha1'      => wfBaseConvert(
				sha1( serialize( $job->getDeduplicationInfo() ) ),
				16, 36, 31
			),
			'job_random'    => mt_rand( 0, self::MAX_JOB_RANDOM )
		);
	}
开发者ID:nahoj,项目名称:mediawiki_ynh,代码行数:22,代码来源:JobQueueDB.php


注:本文中的Job::getDeduplicationInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。