1
|
|
|
<?php |
2
|
|
|
namespace Queue\Test\Fixture; |
3
|
|
|
|
4
|
|
|
use Cake\TestSuite\Fixture\TestFixture; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* QueuedTasksFixture |
8
|
|
|
*/ |
9
|
|
|
class QueuedTasksFixture extends TestFixture |
10
|
|
|
{ |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Fields |
14
|
|
|
* |
15
|
|
|
* @var array |
16
|
|
|
*/ |
17
|
|
|
// @codingStandardsIgnoreStart |
18
|
|
|
public $fields = [ |
19
|
|
|
'id' => ['type' => 'integer', 'length' => 10, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null], |
20
|
|
|
'task' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '', 'precision' => null, 'fixed' => null], |
21
|
|
|
'data' => ['type' => 'text', 'length' => 16777215, 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '', 'precision' => null], |
22
|
|
|
'not_before' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null], |
23
|
|
|
'fetched' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null], |
24
|
|
|
'completed' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null], |
25
|
|
|
'failed_count' => ['type' => 'integer', 'length' => 10, 'unsigned' => true, 'null' => false, 'default' => '0', 'comment' => '', 'precision' => null, 'autoIncrement' => null], |
26
|
|
|
'failure_message' => ['type' => 'text', 'length' => null, 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '', 'precision' => null], |
27
|
|
|
'worker_key' => ['type' => 'string', 'fixed' => true, 'length' => 40, 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '', 'precision' => null], |
28
|
|
|
'created' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null], |
29
|
|
|
'_indexes' => [ |
30
|
|
|
'completed' => ['type' => 'index', 'columns' => ['completed'], 'length' => []], |
31
|
|
|
'worker_key' => ['type' => 'index', 'columns' => ['worker_key'], 'length' => []], |
32
|
|
|
'task' => ['type' => 'index', 'columns' => ['task'], 'length' => []], |
33
|
|
|
], |
34
|
|
|
'_constraints' => [ |
35
|
|
|
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []], |
36
|
|
|
], |
37
|
|
|
'_options' => [ |
38
|
|
|
'engine' => 'InnoDB', |
39
|
|
|
'collation' => 'utf8_general_ci' |
40
|
|
|
], |
41
|
|
|
]; |
42
|
|
|
// @codingStandardsIgnoreEnd |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* Init method |
46
|
|
|
* |
47
|
|
|
* @return void |
48
|
|
|
*/ |
49
|
|
|
public function init() |
50
|
|
|
{ |
51
|
|
|
$this->records = []; |
52
|
|
|
parent::init(); |
53
|
|
|
} |
54
|
|
|
} |
55
|
|
|
|