forked from resque/php-resque
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJob.php
60 lines (52 loc) · 788 Bytes
/
Job.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
namespace Resque\Job;
use Resque\JobHandler;
/**
* Base Resque Job class.
*
* @package Resque\Job
* @author Heinz Wiesinger <[email protected]>
* @license http://www.opensource.org/licenses/mit-license.php
*/
abstract class Job
{
/**
* Job arguments
* @var array
*/
public $args;
/**
* Associated JobHandler instance
* @var JobHandler
*/
public $job;
/**
* Name of the queue the job was in
* @var string
*/
public $queue;
/**
* (Optional) Job setup
*
* @return void
*/
public function setUp(): void
{
// no-op
}
/**
* (Optional) Job teardown
*
* @return void
*/
public function tearDown(): void
{
// no-op
}
/**
* Main method of the Job
*
* @return mixed|void
*/
abstract public function perform();
}