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


PHP Job::getRootJobParams方法代码示例

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


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

示例1: doIsRootJobOldDuplicate

 /**
  * @see JobQueue::isRootJobOldDuplicate()
  * @param Job $job
  * @return bool
  */
 protected function doIsRootJobOldDuplicate(Job $job)
 {
     if (!$job->hasRootJobParams()) {
         return false;
         // job has no de-deplication info
     }
     $params = $job->getRootJobParams();
     $key = $this->getRootJobCacheKey($params['rootJobSignature']);
     // Get the last time this root job was enqueued
     $timestamp = $this->dupCache->get($key);
     // Check if a new root job was started at the location after this one's...
     return $timestamp && $timestamp > $params['rootJobTimestamp'];
 }
开发者ID:Tarendai,项目名称:spring-website,代码行数:18,代码来源:JobQueue.php

示例2: doIsRootJobOldDuplicate

 /**
  * @see JobQueue::doIsRootJobOldDuplicate()
  * @param Job $job
  * @return bool
  * @throws JobQueueError
  */
 protected function doIsRootJobOldDuplicate(Job $job)
 {
     if (!$job->hasRootJobParams()) {
         return false;
         // job has no de-deplication info
     }
     $params = $job->getRootJobParams();
     $conn = $this->getConnection();
     try {
         // Get the last time this root job was enqueued
         $timestamp = $conn->get($this->getRootJobCacheKey($params['rootJobSignature']));
     } catch (RedisException $e) {
         $timestamp = false;
         $this->throwRedisException($conn, $e);
     }
     // Check if a new root job was started at the location after this one's...
     return $timestamp && $timestamp > $params['rootJobTimestamp'];
 }
开发者ID:paladox,项目名称:2,代码行数:24,代码来源:JobQueueRedis.php

示例3: doDeduplicateRootJob

	protected function doDeduplicateRootJob( Job $job ) {
		$params = $job->getRootJobParams();
		$partitions = $this->partitionPushRing->getLocations( $params['rootJobSignature'], 2 );
		try {
			return $this->partitionQueues[$partitions[0]]->doDeduplicateRootJob( $job );
		} catch ( JobQueueError $e ) {
			if ( isset( $partitions[1] ) ) { // check fallback partition
				return $this->partitionQueues[$partitions[1]]->doDeduplicateRootJob( $job );
			}
		}
		return false;
	}
开发者ID:nahoj,项目名称:mediawiki_ynh,代码行数:12,代码来源:JobQueueFederated.php

示例4: doIsRootJobOldDuplicate

 protected function doIsRootJobOldDuplicate(Job $job)
 {
     $params = $job->getRootJobParams();
     $sigature = $params['rootJobSignature'];
     $partition = $this->partitionRing->getLiveLocation($sigature);
     try {
         return $this->partitionQueues[$partition]->doIsRootJobOldDuplicate($job);
     } catch (JobQueueError $e) {
         if ($this->partitionRing->ejectFromLiveRing($partition, 5)) {
             $partition = $this->partitionRing->getLiveLocation($sigature);
             return $this->partitionQueues[$partition]->doIsRootJobOldDuplicate($job);
         }
     }
     return false;
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:15,代码来源:JobQueueFederated.php


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