@@ 816-824 (lines=9) @@ | ||
813 | ); |
|
814 | break; |
|
815 | } |
|
816 | if ($jobDescriptor->JobStatus != QueuedJob::STATUS_RUN) { |
|
817 | // we've been paused by something, so we'll just exit |
|
818 | $job->addMessage(_t( |
|
819 | __CLASS__ . '.JOB_PAUSED', |
|
820 | 'Job paused at {time}', |
|
821 | ['time' => DBDatetime::now()->Rfc2822()] |
|
822 | )); |
|
823 | $broken = true; |
|
824 | } |
|
825 | ||
826 | if (!$broken) { |
|
827 | // Inject real-time log handler |
|
@@ 912-922 (lines=11) @@ | ||
909 | $stallCount++; |
|
910 | } |
|
911 | ||
912 | if ($stallCount > static::config()->get('stall_threshold')) { |
|
913 | $broken = true; |
|
914 | $job->addMessage( |
|
915 | _t( |
|
916 | __CLASS__ . '.JOB_STALLED', |
|
917 | 'Job stalled after {attempts} attempts - please check', |
|
918 | ['attempts' => $stallCount] |
|
919 | ) |
|
920 | ); |
|
921 | $jobDescriptor->JobStatus = QueuedJob::STATUS_BROKEN; |
|
922 | } |
|
923 | ||
924 | // now we'll be good and check our memory usage. If it is too high, we'll set the job to |
|
925 | // a 'Waiting' state, and let the next processing run pick up the job. |