| Total Complexity | 3 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | abstract class QueueTask extends Shell implements QueueTaskInterface |
||
| 19 | { |
||
| 20 | |||
| 21 | /** |
||
| 22 | * |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | public $queueModelClass = 'Queue.QueuedTasks'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * |
||
| 29 | * @var \Queue\Model\Table\QueuedTasksTable |
||
| 30 | */ |
||
| 31 | public $QueuedTasks; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Timeout for run, after which the Task is reassigned to a new worker. |
||
| 35 | * |
||
| 36 | * @var int |
||
| 37 | */ |
||
| 38 | public $timeout = 120; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Number of times a failed instance of this task should be restarted before giving up. |
||
| 42 | * |
||
| 43 | * @var int |
||
| 44 | */ |
||
| 45 | public $retries = 1; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * |
||
| 49 | * @param \Cake\Console\ConsoleIo|null $io IO |
||
| 50 | */ |
||
| 51 | public function __construct(ConsoleIo $io = null) |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * |
||
| 60 | * @return string |
||
| 61 | * @throws \InvalidArgumentException |
||
| 62 | */ |
||
| 63 | protected function queueTaskName() |
||
| 75 |