| @@ 202-211 (lines=10) @@ | ||
| 199 | * @throws PriorityException |
|
| 200 | * @throws ClassNotSubclassException |
|
| 201 | */ |
|
| 202 | protected function validateSaveable(\Dtc\QueueBundle\Model\Job $job) |
|
| 203 | { |
|
| 204 | if (null !== $job->getPriority() && null === $this->maxPriority) { |
|
| 205 | throw new PriorityException('This queue does not support priorities'); |
|
| 206 | } |
|
| 207 | ||
| 208 | if (!$job instanceof Job) { |
|
| 209 | throw new ClassNotSubclassException('Job needs to be instance of '.Job::class); |
|
| 210 | } |
|
| 211 | } |
|
| 212 | ||
| 213 | /** |
|
| 214 | * @param null $workerName |
|
| @@ 294-303 (lines=10) @@ | ||
| 291 | * @throws PriorityException |
|
| 292 | * @throws ClassNotSubclassException |
|
| 293 | */ |
|
| 294 | protected function validateSaveable(\Dtc\QueueBundle\Model\Job $job) |
|
| 295 | { |
|
| 296 | if (null !== $job->getPriority() && null === $this->maxPriority) { |
|
| 297 | throw new PriorityException('This queue does not support priorities'); |
|
| 298 | } |
|
| 299 | ||
| 300 | if (!$job instanceof RetryableJob) { |
|
| 301 | throw new ClassNotSubclassException('Job needs to be instance of '.RetryableJob::class); |
|
| 302 | } |
|
| 303 | } |
|
| 304 | ||
| 305 | protected function verifyGetJobArgs($workerName = null, $methodName = null, $prioritize = true) |
|
| 306 | { |
|