| @@ 309-317 (lines=9) @@ | ||
| 306 | ||
| 307 | // finally, find the list of broken jobs and send an email if there's some found |
|
| 308 | $brokenJobs = QueuedJobDescriptor::get()->filter('JobStatus', QueuedJob::STATUS_BROKEN); |
|
| 309 | if ($brokenJobs && $brokenJobs->count()) { |
|
| 310 | SS_Log::log(array( |
|
| 311 | 'errno' => 0, |
|
| 312 | 'errstr' => 'Broken jobs were found in the job queue', |
|
| 313 | 'errfile' => __FILE__, |
|
| 314 | 'errline' => __LINE__, |
|
| 315 | 'errcontext' => '' |
|
| 316 | ), SS_Log::ERR); |
|
| 317 | } |
|
| 318 | } |
|
| 319 | ||
| 320 | /** |
|
| @@ 591-600 (lines=10) @@ | ||
| 588 | if ($jobDescriptor) { |
|
| 589 | $this->copyJobToDescriptor($job, $jobDescriptor); |
|
| 590 | $jobDescriptor->write(); |
|
| 591 | } else { |
|
| 592 | SS_Log::log(array( |
|
| 593 | 'errno' => 0, |
|
| 594 | 'errstr' => 'Job descriptor has been set to null', |
|
| 595 | 'errfile' => __FILE__, |
|
| 596 | 'errline' => __LINE__, |
|
| 597 | 'errcontext' => '' |
|
| 598 | ), SS_Log::WARN); |
|
| 599 | $broken = true; |
|
| 600 | } |
|
| 601 | } |
|
| 602 | ||
| 603 | // a last final save. The job is complete by now |
|