File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Resque \Reserver ;
4
+
5
+ use Resque_Job ;
6
+
7
+ /**
8
+ * A reserver implements a specific behaviour for reserving jobs from its queues.
9
+ * Resque_Worker will call the reserve() method to obtain a reserved job.
10
+ */
11
+ interface ReserverInterface
12
+ {
13
+ /**
14
+ * Gets the queues to reserve jobs from.
15
+ *
16
+ * @return array
17
+ */
18
+ public function getQueues ();
19
+
20
+ /**
21
+ * Reserves a job.
22
+ *
23
+ * @return Resque_Job|null A job instance or null if not job was available to reserve.
24
+ */
25
+ public function reserve ();
26
+
27
+ /**
28
+ * If there was no job available to reserve, should the worker wait before attempting to reserve a job again?
29
+ *
30
+ * @return bool
31
+ */
32
+ public function waitAfterReservationAttempt ();
33
+
34
+ /**
35
+ * Gets a friendly name of this reserver.
36
+ *
37
+ * @return string
38
+ */
39
+ public function getName ();
40
+ }
You can’t perform that action at this time.
0 commit comments