1 | <?php |
||
19 | class JobQueue implements JobQueueInterface |
||
20 | { |
||
21 | use ContainerAwareTrait; |
||
22 | |||
23 | /** |
||
24 | * Available connections |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $connections = [ |
||
29 | 'default' => [ |
||
30 | 'driver' => 'mongo-thread', |
||
31 | 'collection' => 'queue_jobs', |
||
32 | 'queue' => 'default', |
||
33 | 'expire' => 60, |
||
34 | 'limit' => 2, |
||
35 | 'connection' => MongoDriverInterface::class, // Default mongo connection |
||
36 | ], |
||
37 | ]; |
||
38 | |||
39 | /** |
||
40 | * Manager instance |
||
41 | * |
||
42 | * @var Manager |
||
43 | */ |
||
44 | protected $manager; |
||
45 | |||
46 | /** |
||
47 | * JobQueue constructor. |
||
48 | * |
||
49 | * @param ContainerInterface $container |
||
50 | * @param array $connections |
||
51 | * |
||
52 | * @internal param array $config |
||
53 | */ |
||
54 | public function __construct(ContainerInterface $container, array $connections = []) |
||
61 | |||
62 | /** |
||
63 | * Get queue manager instance |
||
64 | * |
||
65 | * @return QueueManager |
||
66 | */ |
||
67 | public function getQueueManager(): QueueManager |
||
71 | |||
72 | /** |
||
73 | * Push new job to queue |
||
74 | * |
||
75 | * @author Virchenko Maksim <[email protected]> |
||
76 | * |
||
77 | * @param string $job |
||
78 | * @param array $data |
||
79 | * @param string $queue |
||
80 | * @param string $connection |
||
81 | * |
||
82 | * @return mixed |
||
83 | */ |
||
84 | public function push(string $job, array $data = [], string $queue = 'default', string $connection = 'default') |
||
88 | |||
89 | /** |
||
90 | * Push new job to queue if this job is not exist |
||
91 | * |
||
92 | * @author Virchenko Maksim <[email protected]> |
||
93 | * |
||
94 | * @param string $job |
||
95 | * @param array $data |
||
96 | * @param string $queue |
||
97 | * @param string $connection |
||
98 | * |
||
99 | * @return mixed |
||
100 | */ |
||
101 | public function pushUnique(string $job, array $data = [], string $queue = 'default', string $connection = 'default') |
||
109 | |||
110 | /** |
||
111 | * Push a new an array of jobs onto the queue. |
||
112 | * |
||
113 | * @param array $jobs |
||
114 | * @param mixed $data |
||
115 | * @param string $queue |
||
116 | * @param string $connection |
||
117 | * |
||
118 | * @return mixed |
||
119 | */ |
||
120 | public function bulk(array $jobs, array $data = [], string $queue = 'default', string $connection = 'default') |
||
124 | |||
125 | /** |
||
126 | * Push a new job onto the queue after a delay. |
||
127 | * |
||
128 | * @param \DateTime|int $delay |
||
129 | * @param string $job |
||
130 | * @param mixed $data |
||
131 | * @param string $queue |
||
132 | * @param string $connection |
||
133 | * |
||
134 | * @return mixed |
||
135 | */ |
||
136 | public function later(int $delay, string $job, array $data = [], string $queue = 'default', string $connection = 'default') |
||
140 | |||
141 | /** |
||
142 | * Push a new job into the queue after a delay if job does not exist. |
||
143 | * |
||
144 | * @param \DateTime|int $delay |
||
145 | * @param string $job |
||
146 | * @param mixed $data |
||
147 | * @param string $queue |
||
148 | * @param string $connection |
||
149 | * |
||
150 | * @return mixed |
||
151 | */ |
||
152 | public function laterUnique(int $delay, string $job, array $data = [], string $queue = 'default', string $connection = 'default') |
||
160 | |||
161 | /** |
||
162 | * Add connector |
||
163 | * |
||
164 | * @param string $name |
||
165 | * @param Closure $resolver |
||
166 | */ |
||
167 | public function addConnector(string $name, ConnectorInterface $connector) |
||
173 | |||
174 | /** |
||
175 | * Connect queue manager for mongo database |
||
176 | * |
||
177 | * @author Virchenko Maksim <[email protected]> |
||
178 | * |
||
179 | * @return Manager |
||
180 | */ |
||
181 | protected function connect() |
||
197 | } |
||
198 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.