2017-04-26 12:52:20 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\FullTextSearch\Tests\SolrReindexQueuedTest;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
2018-06-15 04:33:40 +02:00
|
|
|
use Symbiote\QueuedJobs\Services\QueuedJob;
|
|
|
|
use Symbiote\QueuedJobs\Services\QueuedJobService;
|
2017-04-26 12:52:20 +02:00
|
|
|
|
2018-06-15 04:33:40 +02:00
|
|
|
if (!class_exists(QueuedJobService::class)) {
|
2017-04-26 12:52:20 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
class SolrReindexQueuedTest_Service extends QueuedJobService implements TestOnly
|
|
|
|
{
|
|
|
|
private static $dependencies = [
|
|
|
|
'queueHandler' => '%$QueueHandler'
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return QueuedJob
|
|
|
|
*/
|
|
|
|
public function getNextJob()
|
|
|
|
{
|
|
|
|
$job = $this->getNextPendingJob();
|
|
|
|
return $this->initialiseJob($job);
|
|
|
|
}
|
|
|
|
}
|