本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: getDeduplicationInfo
public function getDeduplicationInfo()
{
$info = parent::getDeduplicationInfo();
unset($info['params']['revTimestamp']);
// first job wins
return $info;
}
示例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));
}
示例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());
}
示例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
);
}
示例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 )
);
}