| 1 | <?php |
||
| 9 | abstract class Job |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var \Resque_Job |
||
| 13 | */ |
||
| 14 | public $job; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string The queue name |
||
| 18 | */ |
||
| 19 | public $queue = 'default'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var array The job args |
||
| 23 | */ |
||
| 24 | public $args = []; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | public function getName() |
||
| 33 | |||
| 34 | /** |
||
| 35 | * |
||
| 36 | */ |
||
| 37 | public function setUp() |
||
| 41 | |||
| 42 | /** |
||
| 43 | * |
||
| 44 | */ |
||
| 45 | public function perform() |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param $args |
||
| 52 | * @return mixed |
||
| 53 | */ |
||
| 54 | abstract public function run($args); |
||
| 55 | |||
| 56 | /** |
||
| 57 | * |
||
| 58 | */ |
||
| 59 | public function tearDown() |
||
| 63 | } |
||
| 64 |