@@ -162,7 +162,7 @@ |
||
| 162 | 162 | /** |
| 163 | 163 | * @param array $data |
| 164 | 164 | * @param Form $form |
| 165 | - * @return HTTPResponse |
|
| 165 | + * @return \SilverStripe\Control\HTTPResponse |
|
| 166 | 166 | */ |
| 167 | 167 | public function createjob($data, Form $form) |
| 168 | 168 | { |
@@ -263,7 +263,7 @@ |
||
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | /** |
| 266 | - * @return FieldList |
|
| 266 | + * @return \SilverStripe\Forms\FieldList |
|
| 267 | 267 | */ |
| 268 | 268 | public function getCMSFields() |
| 269 | 269 | { |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | * Which columns are handled by this component |
| 105 | 105 | * |
| 106 | 106 | * @param GridField $gridField |
| 107 | - * @return array |
|
| 107 | + * @return string[] |
|
| 108 | 108 | */ |
| 109 | 109 | public function getColumnsHandled($gridField) |
| 110 | 110 | { |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | * Which GridField actions are this component handling |
| 116 | 116 | * |
| 117 | 117 | * @param GridField $gridField |
| 118 | - * @return array |
|
| 118 | + * @return string[] |
|
| 119 | 119 | */ |
| 120 | 120 | public function getActions($gridField) |
| 121 | 121 | { |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | * @param GridField $gridField |
| 127 | 127 | * @param DataObject $record |
| 128 | 128 | * @param string $columnName |
| 129 | - * @return string|void - the HTML for the column |
|
| 129 | + * @return null|\SilverStripe\ORM\FieldType\DBHTMLText - the HTML for the column |
|
| 130 | 130 | */ |
| 131 | 131 | public function getColumnContent($gridField, $record, $columnName) |
| 132 | 132 | { |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | 60 | * Required because we aren't extending object |
| 61 | - * @return Config_ForClass |
|
| 61 | + * @return \SilverStripe\Core\Config\Config_ForClass |
|
| 62 | 62 | */ |
| 63 | 63 | public function config() |
| 64 | 64 | { |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | * |
| 141 | 141 | * @param QueuedJob $job |
| 142 | 142 | * The job to start. |
| 143 | - * @param $startAfter |
|
| 143 | + * @param string $startAfter |
|
| 144 | 144 | * The date (in Y-m-d H:i:s format) to start execution after |
| 145 | 145 | * @param int $userId |
| 146 | 146 | * The ID of a user to execute the job as. Defaults to the current user |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | /** |
| 190 | 190 | * Start a job (or however the queue handler determines it should be started) |
| 191 | 191 | * |
| 192 | - * @param JobDescriptor $jobDescriptor |
|
| 192 | + * @param QueuedJobDescriptor $jobDescriptor |
|
| 193 | 193 | * @param date $startAfter |
| 194 | 194 | */ |
| 195 | 195 | public function startJob($jobDescriptor, $startAfter = null) |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | * Copies data from a job into a descriptor for persisting |
| 207 | 207 | * |
| 208 | 208 | * @param QueuedJob $job |
| 209 | - * @param JobDescriptor $jobDescriptor |
|
| 209 | + * @param DataObject $jobDescriptor |
|
| 210 | 210 | */ |
| 211 | 211 | protected function copyJobToDescriptor($job, $jobDescriptor) |
| 212 | 212 | { |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | * Attempt to restart a stalled job |
| 362 | 362 | * |
| 363 | 363 | * @param QueuedJobDescriptor $stalledJob |
| 364 | - * @return bool True if the job was successfully restarted |
|
| 364 | + * @return boolean|null True if the job was successfully restarted |
|
| 365 | 365 | */ |
| 366 | 366 | protected function restartStalledJob($stalledJob) |
| 367 | 367 | { |
@@ -827,6 +827,9 @@ discard block |
||
| 827 | 827 | } |
| 828 | 828 | } |
| 829 | 829 | |
| 830 | + /** |
|
| 831 | + * @param double $size |
|
| 832 | + */ |
|
| 830 | 833 | protected function humanReadable($size) |
| 831 | 834 | { |
| 832 | 835 | $filesizename = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB"); |
@@ -842,7 +845,7 @@ discard block |
||
| 842 | 845 | * @param int $includeUpUntil |
| 843 | 846 | * The number of seconds to include jobs that have just finished, allowing a job list to be built that |
| 844 | 847 | * includes recently finished jobs |
| 845 | - * @return QueuedJobDescriptor |
|
| 848 | + * @return DataList |
|
| 846 | 849 | */ |
| 847 | 850 | public function getJobList($type = null, $includeUpUntil = 0) |
| 848 | 851 | { |
@@ -6,12 +6,10 @@ |
||
| 6 | 6 | use SilverStripe\Control\Controller; |
| 7 | 7 | use SilverStripe\Control\Director; |
| 8 | 8 | use SilverStripe\Control\Email\Email; |
| 9 | -use SilverStripe\Control\Session; |
|
| 10 | 9 | use SilverStripe\Core\Config\Config; |
| 11 | 10 | use SilverStripe\Core\Config\Configurable; |
| 12 | 11 | use SilverStripe\Core\Convert; |
| 13 | 12 | use SilverStripe\Core\Injector\Injector; |
| 14 | -use SilverStripe\Dev\SapphireTest; |
|
| 15 | 13 | use SilverStripe\ORM\DataList; |
| 16 | 14 | use SilverStripe\ORM\DataObject; |
| 17 | 15 | use SilverStripe\ORM\DB; |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use SilverStripe\Core\ClassInfo; |
| 6 | 6 | use SilverStripe\Dev\BuildTask; |
| 7 | -use Symbiote\QueuedJobs\Services\AbstractQueuedJob; |
|
| 8 | 7 | use Symbiote\QueuedJobs\Services\QueuedJobService; |
| 9 | 8 | |
| 10 | 9 | /** |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | - * @return array List of rules |
|
| 33 | + * @return string List of rules |
|
| 34 | 34 | */ |
| 35 | 35 | public function getDefaultRules() |
| 36 | 36 | { |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | 81 | * @param string $queue |
| 82 | - * @return null|QueuedJobDescriptor |
|
| 82 | + * @return \SilverStripe\ORM\DataObject|null |
|
| 83 | 83 | */ |
| 84 | 84 | protected function getNextJobDescriptorWithoutMutex($queue) |
| 85 | 85 | { |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Symbiote\QueuedJobs\Tasks\Engines; |
| 4 | 4 | |
| 5 | -use AsyncPHP\Doorman\Rule; |
|
| 6 | 5 | use SilverStripe\ORM\FieldType\DBDatetime; |
| 7 | 6 | use Symbiote\QueuedJobs\DataObjects\QueuedJobDescriptor; |
| 8 | 7 | use Symbiote\QueuedJobs\Jobs\DoormanQueuedJobTask; |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Symbiote\QueuedJobs\Tasks; |
| 4 | 4 | |
| 5 | -use AsyncPHP\Doorman\Handler; |
|
| 6 | -use AsyncPHP\Doorman\Task; |
|
| 7 | 5 | use SilverStripe\Dev\BuildTask; |
| 8 | 6 | |
| 9 | 7 | class ProcessJobQueueChildTask extends BuildTask |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Symbiote\QueuedJobs\Tests; |
| 4 | 4 | |
| 5 | -use SilverStripe\Dev\SapphireTest; |
|
| 6 | 5 | use SilverStripe\Core\Config\Config; |
| 7 | 6 | use SilverStripe\ORM\FieldType\DBDatetime; |
| 8 | 7 | use Symbiote\QueuedJobs\Jobs\CleanupJob; |