File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Resque \Job ;
4+
5+ use Resque \JobHandler ;
6+
7+ /**
8+ * Base Resque Job class.
9+ *
10+ * @package Resque\Job
11+ * @author Heinz Wiesinger <pprkut@liwjatan.org>
12+ * @license http://www.opensource.org/licenses/mit-license.php
13+ */
14+ abstract class Job
15+ {
16+ /**
17+ * Job arguments
18+ * @var array
19+ */
20+ public $ args ;
21+
22+ /**
23+ * Associated JobHandler instance
24+ * @var JobHandler
25+ */
26+ public $ job ;
27+
28+ /**
29+ * Name of the queue the job was in
30+ * @var string
31+ */
32+ public $ queue ;
33+
34+ /**
35+ * (Optional) Job setup
36+ *
37+ * @return void
38+ */
39+ public function setUp (): void
40+ {
41+ // no-op
42+ }
43+
44+ /**
45+ * (Optional) Job teardown
46+ *
47+ * @return void
48+ */
49+ public function tearDown (): void
50+ {
51+ // no-op
52+ }
53+
54+ /**
55+ * Main method of the Job
56+ *
57+ * @return mixed|void
58+ */
59+ abstract public function perform ();
60+ }
You can’t perform that action at this time.
0 commit comments