| @@ 193-202 (lines=10) @@ | ||
| 190 | * @throws PriorityException |
|
| 191 | * @throws ClassNotSubclassException |
|
| 192 | */ |
|
| 193 | protected function validateSaveable(\Dtc\QueueBundle\Model\Job $job) |
|
| 194 | { |
|
| 195 | if (null !== $job->getPriority() && null === $this->maxPriority) { |
|
| 196 | throw new PriorityException('This queue does not support priorities'); |
|
| 197 | } |
|
| 198 | ||
| 199 | if (!$job instanceof Job) { |
|
| 200 | throw new ClassNotSubclassException('Job needs to be instance of '.Job::class); |
|
| 201 | } |
|
| 202 | } |
|
| 203 | ||
| 204 | /** |
|
| 205 | * @param string|null $workerName |
|
| @@ 316-325 (lines=10) @@ | ||
| 313 | * @throws PriorityException |
|
| 314 | * @throws ClassNotSubclassException |
|
| 315 | */ |
|
| 316 | protected function validateSaveable(\Dtc\QueueBundle\Model\Job $job) |
|
| 317 | { |
|
| 318 | if (null !== $job->getPriority() && null === $this->maxPriority) { |
|
| 319 | throw new PriorityException('This queue does not support priorities'); |
|
| 320 | } |
|
| 321 | ||
| 322 | if (!$job instanceof RetryableJob) { |
|
| 323 | throw new ClassNotSubclassException('Job needs to be instance of '.RetryableJob::class); |
|
| 324 | } |
|
| 325 | } |
|
| 326 | ||
| 327 | /** |
|
| 328 | * @param string|null $workerName |
|