@@ 453-470 (lines=18) @@ | ||
450 | ||
451 | // finally, find the list of broken jobs and send an email if there's some found |
|
452 | $brokenJobs = QueuedJobDescriptor::get()->filter('JobStatus', QueuedJob::STATUS_BROKEN); |
|
453 | if ($brokenJobs && $brokenJobs->count()) { |
|
454 | $this->getLogger()->error( |
|
455 | print_r( |
|
456 | [ |
|
457 | 'errno' => 0, |
|
458 | 'errstr' => 'Broken jobs were found in the job queue', |
|
459 | 'errfile' => __FILE__, |
|
460 | 'errline' => __LINE__, |
|
461 | 'errcontext' => [], |
|
462 | ], |
|
463 | true |
|
464 | ), |
|
465 | [ |
|
466 | 'file' => __FILE__, |
|
467 | 'line' => __LINE__, |
|
468 | ] |
|
469 | ); |
|
470 | } |
|
471 | ||
472 | return $stalledJobs->count(); |
|
473 | } |
|
@@ 956-974 (lines=19) @@ | ||
953 | if ($jobDescriptor) { |
|
954 | $this->copyJobToDescriptor($job, $jobDescriptor); |
|
955 | $jobDescriptor->write(); |
|
956 | } else { |
|
957 | $this->getLogger()->error( |
|
958 | print_r( |
|
959 | [ |
|
960 | 'errno' => 0, |
|
961 | 'errstr' => 'Job descriptor has been set to null', |
|
962 | 'errfile' => __FILE__, |
|
963 | 'errline' => __LINE__, |
|
964 | 'errcontext' => [], |
|
965 | ], |
|
966 | true |
|
967 | ), |
|
968 | [ |
|
969 | 'file' => __FILE__, |
|
970 | 'line' => __LINE__, |
|
971 | ] |
|
972 | ); |
|
973 | $broken = true; |
|
974 | } |
|
975 | } |
|
976 | ||
977 | // a last final save. The job is complete by now |