Completed
Push — master ( f6988b...e585dd )
by Nicolas
02:37
created

RedisEntryConsumer::isMyJob()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Wallabag\ImportBundle\Consumer;
4
5
use Simpleue\Job\Job;
6
7
class RedisEntryConsumer extends AbstractConsumer implements Job
8
{
9
    /**
10
     * Handle one message by one message.
11
     *
12
     * @param string $job Content of the message (directly from Redis)
13
     *
14
     * @return bool
15
     */
16
    public function manage($job)
17
    {
18
        return $this->handleMessage($job);
19
    }
20
21
    /**
22
     * Should tell if the given job will kill the worker.
23
     * We don't want to stop it :).
24
     *
25
     * @param string $job Content of the message (directly from Redis)
26
     *
27
     * @return false
28
     */
29
    public function isStopJob($job)
30
    {
31
        return false;
32
    }
33
34
    /**
35
     * This abstract method is only used when we use one queue for multiple job type.
36
     * We don't do that, so we'll always return true.
37
     *
38
     * @param string $job Content of the message (directly from Redis)
39
     *
40
     * @return true
41
     */
42
    public function isMyJob($job)
43
    {
44
        return true;
45
    }
46
}
47