1 | <?php |
||
15 | class ChronosJobEntity implements JobEntityInterface |
||
16 | { |
||
17 | public $name = ''; |
||
18 | |||
19 | public $command = ''; |
||
20 | |||
21 | public $description = ''; |
||
22 | |||
23 | public $owner = ''; |
||
24 | |||
25 | public $ownerName = ''; |
||
26 | |||
27 | public $schedule = ''; // todo: move to separate entity |
||
28 | |||
29 | public $scheduleTimeZone = ''; |
||
30 | |||
31 | public $parents = []; // todo: move to separate entity |
||
32 | |||
33 | public $epsilon = ''; |
||
34 | |||
35 | public $executor = ''; |
||
36 | |||
37 | public $executorFlags = ''; |
||
38 | |||
39 | public $shell = true; |
||
40 | |||
41 | public $retries = 0; |
||
42 | |||
43 | public $async = false; |
||
44 | |||
45 | public $successCount = 0; |
||
46 | |||
47 | public $errorCount = 0; |
||
48 | |||
49 | public $errorsSinceLastSuccess = 0; |
||
50 | |||
51 | public $lastSuccess = ''; |
||
52 | |||
53 | public $lastError = ''; |
||
54 | |||
55 | public $cpus = 0.1; |
||
56 | |||
57 | public $disk = 24; |
||
58 | |||
59 | public $mem = 32; |
||
60 | |||
61 | public $disabled = false; |
||
62 | |||
63 | public $softError = false; |
||
64 | |||
65 | public $dataProcessingJobType = false; |
||
66 | |||
67 | public $uris = []; |
||
68 | |||
69 | public $environmentVariables = []; |
||
70 | |||
71 | public $arguments = []; |
||
72 | |||
73 | public $highPriority = false; |
||
74 | |||
75 | public $runAsUser = 'root'; |
||
76 | |||
77 | public $constraints = []; |
||
78 | |||
79 | /** @var ContainerEntity */ |
||
80 | public $container = null; |
||
81 | |||
82 | |||
83 | /** |
||
84 | * @param array|object $jobData |
||
85 | * @throws \InvalidArgumentException |
||
86 | */ |
||
87 | 116 | public function __construct($jobData = []) |
|
103 | |||
104 | /** |
||
105 | * return entity as one-dimensional array |
||
106 | * |
||
107 | * @return mixed[] |
||
108 | */ |
||
109 | 8 | public function getSimpleArrayCopy() |
|
119 | |||
120 | /** |
||
121 | * @return bool |
||
122 | */ |
||
123 | 18 | public function isSchedulingJob() |
|
127 | |||
128 | /** |
||
129 | * @return bool |
||
130 | */ |
||
131 | 7 | public function isDependencyJob() |
|
135 | |||
136 | /** |
||
137 | * @return array |
||
138 | */ |
||
139 | 11 | public function jsonSerialize() |
|
161 | |||
162 | /** |
||
163 | * @return \ArrayIterator |
||
164 | */ |
||
165 | 9 | public function getIterator() |
|
169 | |||
170 | /** |
||
171 | * @return string |
||
172 | */ |
||
173 | 5 | public function getEntityType() |
|
177 | |||
178 | /** |
||
179 | * @return string |
||
180 | */ |
||
181 | 41 | public function getKey() |
|
185 | } |
||
186 |