| @@ 423-440 (lines=18) @@ | ||
| 420 | ||
| 421 | // finally, find the list of broken jobs and send an email if there's some found |
|
| 422 | $brokenJobs = QueuedJobDescriptor::get()->filter('JobStatus', QueuedJob::STATUS_BROKEN); |
|
| 423 | if ($brokenJobs && $brokenJobs->count()) { |
|
| 424 | $this->getLogger()->error( |
|
| 425 | print_r( |
|
| 426 | [ |
|
| 427 | 'errno' => 0, |
|
| 428 | 'errstr' => 'Broken jobs were found in the job queue', |
|
| 429 | 'errfile' => __FILE__, |
|
| 430 | 'errline' => __LINE__, |
|
| 431 | 'errcontext' => [], |
|
| 432 | ], |
|
| 433 | true |
|
| 434 | ), |
|
| 435 | [ |
|
| 436 | 'file' => __FILE__, |
|
| 437 | 'line' => __LINE__, |
|
| 438 | ] |
|
| 439 | ); |
|
| 440 | } |
|
| 441 | ||
| 442 | return $stalledJobs->count(); |
|
| 443 | } |
|
| @@ 918-936 (lines=19) @@ | ||
| 915 | if ($jobDescriptor) { |
|
| 916 | $this->copyJobToDescriptor($job, $jobDescriptor); |
|
| 917 | $jobDescriptor->write(); |
|
| 918 | } else { |
|
| 919 | $this->getLogger()->error( |
|
| 920 | print_r( |
|
| 921 | [ |
|
| 922 | 'errno' => 0, |
|
| 923 | 'errstr' => 'Job descriptor has been set to null', |
|
| 924 | 'errfile' => __FILE__, |
|
| 925 | 'errline' => __LINE__, |
|
| 926 | 'errcontext' => [], |
|
| 927 | ], |
|
| 928 | true |
|
| 929 | ), |
|
| 930 | [ |
|
| 931 | 'file' => __FILE__, |
|
| 932 | 'line' => __LINE__, |
|
| 933 | ] |
|
| 934 | ); |
|
| 935 | $broken = true; |
|
| 936 | } |
|
| 937 | } |
|
| 938 | ||
| 939 | // a last final save. The job is complete by now |
|