File tree Expand file tree Collapse file tree 1 file changed +29
-2
lines changed Expand file tree Collapse file tree 1 file changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -193,14 +193,41 @@ public function peek($limit = 1)
193
193
/**
194
194
* @inheritdoc
195
195
*/
196
- public function count ()
196
+ public function count ():int
197
+ {
198
+ return $ this ->countReady ();
199
+ }
200
+
201
+ /**
202
+ * @inheritdoc
203
+ */
204
+ public function countReady (): int
197
205
{
198
206
$ this ->checkClientConnection ();
199
207
return $ this ->client ->lLen ("queue: {$ this ->name }:messages " );
200
208
}
201
209
210
+ /**
211
+ * @inheritdoc
212
+ */
213
+ public function countReserved (): int
214
+ {
215
+ $ this ->checkClientConnection ();
216
+ return $ this ->client ->lLen ("queue: {$ this ->name }:processing " );
217
+ }
218
+
219
+ /**
220
+ * @inheritdoc
221
+ */
222
+ public function countFailed (): int
223
+ {
224
+ $ this ->checkClientConnection ();
225
+ return $ this ->client ->lLen ("queue: {$ this ->name }:failed " );
226
+ }
227
+
202
228
/**
203
229
* @return void
230
+ * @throws JobQueueException
204
231
*/
205
232
public function setUp ()
206
233
{
@@ -279,4 +306,4 @@ protected function connectClient()
279
306
}
280
307
return $ connected ;
281
308
}
282
- }
309
+ }
You can’t perform that action at this time.
0 commit comments