Passed
Push — Firesphere-funding-yml ( ab824b...2bf34e )
by Simon
18:25 queued 11:53
created

ClearDirtyClassesJob::process()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 7
rs 10
1
<?php
2
3
4
namespace Firesphere\SolrSearch\Jobs;
5
6
use Firesphere\SolrSearch\Tasks\ClearDirtyClassesTask;
7
use SilverStripe\Control\NullHTTPRequest;
8
use Symbiote\QueuedJobs\Services\AbstractQueuedJob;
9
10
class ClearDirtyClassesJob extends AbstractQueuedJob
11
{
12
13
    /**
14
     * @return string
15
     */
16
    public function getTitle()
17
    {
18
        return _t(self::class . '.CLEARSOLRDIRTY', 'Clear out dirty objects in Solr');
19
    }
20
21
    /**
22
     * Do some processing yourself!
23
     */
24
    public function process()
25
    {
26
        $request = new NullHTTPRequest();
27
        $task = new ClearDirtyClassesTask();
28
        $task->run($request);
29
30
        $this->isComplete = true;
31
    }
32
}
33