diff --git a/src/mongo/jobs/ApplyOperation.class.php b/src/mongo/jobs/ApplyOperation.class.php index ba342f9a..370fba2a 100644 --- a/src/mongo/jobs/ApplyOperation.class.php +++ b/src/mongo/jobs/ApplyOperation.class.php @@ -57,6 +57,10 @@ public function createJob(Array $subjects, $queueName=null) { $queueName = \Tripod\Mongo\Config::getApplyQueueName(); } + elseif(strpos($queueName, \Tripod\Mongo\Config::getApplyQueueName()) === false) + { + $queueName = \Tripod\Mongo\Config::getApplyQueueName() . '::' . $queueName; + } $data = array( self::SUBJECTS_KEY=>array_map(function(\Tripod\Mongo\ImpactedSubject $subject) { return $subject->toArray(); }, $subjects), diff --git a/src/mongo/jobs/DiscoverImpactedSubjects.class.php b/src/mongo/jobs/DiscoverImpactedSubjects.class.php index e8697084..e5ab4028 100644 --- a/src/mongo/jobs/DiscoverImpactedSubjects.class.php +++ b/src/mongo/jobs/DiscoverImpactedSubjects.class.php @@ -144,6 +144,10 @@ public function createJob(Array $data, $queueName=null) { $queueName = Config::getDiscoverQueueName(); } + elseif(strpos($queueName, \Tripod\Mongo\Config::getDiscoverQueueName()) === false) + { + $queueName = \Tripod\Mongo\Config::getDiscoverQueueName() . '::' . $queueName; + } $this->submitJob($queueName,get_class($this),$data); } diff --git a/test/unit/mongo/ApplyOperationTest.php b/test/unit/mongo/ApplyOperationTest.php index 1b11576b..d8ebe834 100644 --- a/test/unit/mongo/ApplyOperationTest.php +++ b/test/unit/mongo/ApplyOperationTest.php @@ -273,7 +273,7 @@ public function testCreateJobSpecifyQueue() ->setMockClassName('MockApplyOperation') ->getMock(); - $queueName = 'TRIPOD_TESTING_QUEUE_' . uniqid(); + $queueName = \Tripod\Mongo\Config::getApplyQueueName() . '::TRIPOD_TESTING_QUEUE_' . uniqid(); $applyOperation->expects($this->once()) ->method('submitJob') diff --git a/test/unit/mongo/DiscoverImpactedSubjectsTest.php b/test/unit/mongo/DiscoverImpactedSubjectsTest.php index baf56162..fee4d639 100644 --- a/test/unit/mongo/DiscoverImpactedSubjectsTest.php +++ b/test/unit/mongo/DiscoverImpactedSubjectsTest.php @@ -250,7 +250,7 @@ public function testCreateJobSpecifyQueue() 'contextAlias'=>'http://talisaspire.com/' ); - $queueName = 'TRIPOD_TESTING_QUEUE_' . uniqid(); + $queueName = \Tripod\Mongo\Config::getDiscoverQueueName() . '::TRIPOD_TESTING_QUEUE_' . uniqid(); /** @var \Tripod\Mongo\Jobs\DiscoverImpactedSubjects|PHPUnit_Framework_MockObject_MockObject $discoverImpactedSubjects */ $discoverImpactedSubjects = $this->getMockBuilder('\Tripod\Mongo\Jobs\DiscoverImpactedSubjects')