1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Dtc\QueueBundle\Entity; |
4
|
|
|
|
5
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
6
|
|
|
use Dtc\QueueBundle\Model\MicrotimeTrait; |
7
|
|
|
use Dtc\QueueBundle\Model\StallableJob; |
8
|
|
|
|
9
|
|
|
/** |
10
|
|
|
* Class BaseJob. |
11
|
|
|
*/ |
12
|
|
|
abstract class BaseJob extends StallableJob |
13
|
|
|
{ |
14
|
1 |
|
use MicrotimeTrait; |
15
|
|
|
#[ORM\Column(name: 'id', type: 'bigint')] |
16
|
|
|
#[ORM\Id] |
17
|
|
|
#[ORM\GeneratedValue(strategy: 'AUTO')] |
18
|
|
|
protected $id; |
19
|
|
|
|
20
|
|
|
#[ORM\Column(name: 'worker_name', type: 'string')] |
21
|
|
|
protected $workerName; |
22
|
|
|
|
23
|
|
|
#[ORM\Column(name: 'class_name', type: 'string')] |
24
|
|
|
protected $className; |
25
|
|
|
|
26
|
|
|
#[ORM\Column(name: 'method', type: 'string')] |
27
|
|
|
protected $method; |
28
|
|
|
|
29
|
|
|
#[ORM\Column(name: 'status', type: 'string')] |
30
|
|
|
protected $status; |
31
|
|
|
|
32
|
|
|
#[ORM\Column(name: 'args', type: 'text')] |
33
|
|
|
protected $args; |
34
|
|
|
|
35
|
|
|
#[ORM\Column(name: 'priority', type: 'integer', nullable: true)] |
36
|
|
|
protected $priority; |
37
|
|
|
|
38
|
|
|
#[ORM\Column(name: 'crc_hash', type: 'string')] |
39
|
|
|
protected $crcHash; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* whenAt in Microseconds. |
43
|
|
|
*/ |
44
|
|
|
#[ORM\Column(name: 'when_us', type: 'decimal', precision: 18, scale: 0, nullable: true)] |
45
|
|
|
protected $whenUs; |
46
|
|
|
|
47
|
|
|
#[ORM\Column(name: 'expires_at', type: 'datetime', nullable: true)] |
48
|
|
|
protected $expiresAt; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* When the job started. |
52
|
|
|
*/ |
53
|
|
|
#[ORM\Column(name: 'started_at', type: 'datetime', nullable: true)] |
54
|
|
|
protected $startedAt; |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* When the job finished. |
58
|
|
|
*/ |
59
|
|
|
#[ORM\Column(name: 'finished_at', type: 'datetime', nullable: true)] |
60
|
|
|
protected $finishedAt; |
61
|
|
|
|
62
|
|
|
#[ORM\Column(name: 'elapsed', type: 'float', nullable: true)] |
63
|
|
|
protected $elapsed; |
64
|
|
|
|
65
|
|
|
#[ORM\Column(name: 'message', type: 'text', nullable: true)] |
66
|
|
|
protected $message; |
67
|
|
|
|
68
|
|
|
#[ORM\Column(name: 'created_at', type: 'datetime')] |
69
|
|
|
protected $createdAt; |
70
|
|
|
|
71
|
|
|
#[ORM\Column(name: 'updated_at', type: 'datetime')] |
72
|
|
|
protected $updatedAt; |
73
|
|
|
|
74
|
|
|
#[ORM\Column(name: 'max_duration', type: 'integer', nullable: true)] |
75
|
|
|
protected $maxDuration; |
76
|
|
|
|
77
|
|
|
#[ORM\Column(name: 'run_id', type: 'bigint', nullable: true)] |
78
|
|
|
protected $runId; |
79
|
|
|
|
80
|
|
|
#[ORM\Column(name: 'stalls', type: 'integer')] |
81
|
|
|
protected $stalls = 0; |
82
|
|
|
|
83
|
|
|
#[ORM\Column(name: 'max_stalls', type: 'integer', nullable: true)] |
84
|
|
|
protected $maxStalls; |
85
|
|
|
|
86
|
|
|
#[ORM\Column(name: 'exceptions', type: 'integer')] |
87
|
|
|
protected $exceptions = 0; |
88
|
|
|
|
89
|
|
|
#[ORM\Column(name: 'max_exceptions', type: 'integer', nullable: true)] |
90
|
|
|
protected $maxExceptions; |
91
|
|
|
|
92
|
|
|
#[ORM\Column(name: 'failures', type: 'integer')] |
93
|
|
|
protected $failures = 0; |
94
|
|
|
|
95
|
|
|
#[ORM\Column(name: 'max_failures', type: 'integer', nullable: true)] |
96
|
|
|
protected $maxFailures; |
97
|
|
|
|
98
|
|
|
#[ORM\Column(name: 'retries', type: 'integer')] |
99
|
|
|
protected $retries = 0; |
100
|
|
|
|
101
|
|
|
#[ORM\Column(name: 'max_retries', type: 'integer', nullable: true)] |
102
|
|
|
protected $maxRetries; |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* @return mixed |
106
|
|
|
*/ |
107
|
|
|
public function getRunId() |
108
|
|
|
{ |
109
|
|
|
return $this->runId; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* @param mixed $runId |
114
|
|
|
*/ |
115
|
|
|
public function setRunId($runId) |
116
|
|
|
{ |
117
|
|
|
$this->runId = $runId; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
public function setArgs($args) |
121
|
|
|
{ |
122
|
|
|
$args = serialize($args); |
123
|
|
|
parent::setArgs($args); |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
public function getArgs() |
127
|
|
|
{ |
128
|
|
|
$args = parent::getArgs(); |
129
|
|
|
|
130
|
|
|
return unserialize($args); |
131
|
|
|
} |
132
|
|
|
} |
133
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths