@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | /** |
163 | 163 | * Start a job (or however the queue handler determines it should be started) |
164 | 164 | * |
165 | - * @param JobDescriptor $jobDescriptor |
|
165 | + * @param QueuedJobDescriptor $jobDescriptor |
|
166 | 166 | * @param date $startAfter |
167 | 167 | */ |
168 | 168 | public function startJob($jobDescriptor, $startAfter = null) { |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | * Copies data from a job into a descriptor for persisting |
179 | 179 | * |
180 | 180 | * @param QueuedJob $job |
181 | - * @param JobDescriptor $jobDescriptor |
|
181 | + * @param DataObject $jobDescriptor |
|
182 | 182 | */ |
183 | 183 | protected function copyJobToDescriptor($job, $jobDescriptor) { |
184 | 184 | $data = $job->getJobData(); |
@@ -322,6 +322,7 @@ discard block |
||
322 | 322 | |
323 | 323 | /** |
324 | 324 | * Checks through all the scheduled jobs that are expected to exist |
325 | + * @param string $queue |
|
325 | 326 | */ |
326 | 327 | public function checkdefaultJobs($queue = null) { |
327 | 328 | $queue = $queue ?: QueuedJob::QUEUED; |
@@ -375,7 +376,7 @@ discard block |
||
375 | 376 | * Attempt to restart a stalled job |
376 | 377 | * |
377 | 378 | * @param QueuedJobDescriptor $stalledJob |
378 | - * @return bool True if the job was successfully restarted |
|
379 | + * @return boolean|null True if the job was successfully restarted |
|
379 | 380 | */ |
380 | 381 | protected function restartStalledJob($stalledJob) { |
381 | 382 | if ($stalledJob->ResumeCounts < Config::inst()->get(__CLASS__, 'stall_threshold')) { |
@@ -791,6 +792,9 @@ discard block |
||
791 | 792 | } |
792 | 793 | } |
793 | 794 | |
795 | + /** |
|
796 | + * @param double $size |
|
797 | + */ |
|
794 | 798 | protected function humanReadable($size) { |
795 | 799 | $filesizename = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB"); |
796 | 800 | return $size ? round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . $filesizename[$i] : '0 Bytes'; |