Passed
Pull Request — master (#35)
by
unknown
03:37
created

Config   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 55
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A defaultWorkerTimeout() 0 3 1
A sleepTime() 0 3 1
A defaultWorkerRetries() 0 3 1
A gcprob() 0 3 1
A workerMaxRuntime() 0 3 1
A cleanupTimeout() 0 3 1
1
<?php
2
namespace Queue\Queue;
3
4
use Cake\Core\Configure;
5
6
class Config
7
{
8
9
    /**
10
     *
11
     * @return int
12
     */
13
    public static function defaultWorkerTimeout()
14
    {
15
        return Configure::read('Queue.defaultWorkerTimeout', 600); // 10min
16
    }
17
18
    /**
19
     *
20
     * @return int
21
     */
22
    public static function workerMaxRuntime()
23
    {
24
        return Configure::read('Queue.workerMaxRuntime', 120);
25
    }
26
27
    /**
28
     *
29
     * @return int
30
     */
31
    public static function cleanupTimeout()
32
    {
33
        return Configure::read('Queue.cleanupTimeout', 2592000); // 30 days
34
    }
35
36
    /**
37
     *
38
     * @return int
39
     */
40
    public static function sleepTime()
41
    {
42
        return Configure::read('Queue.sleepTime', 10);
43
    }
44
45
    /**
46
     *
47
     * @return int
48
     */
49
    public static function gcprob()
50
    {
51
        return Configure::read('Queue.gcprob', 10);
52
    }
53
54
    /**
55
     *
56
     * @return int
57
     */
58
    public static function defaultWorkerRetries()
59
    {
60
        return Configure::read('Queue.defaultWorkerRetries', 1);
61
    }
62
}
63