githubtrue/backend/vendor/illuminate/bus/Queueable.php @ b50f8ebd
1 |
<?php
|
---|---|
2 |
|
3 |
namespace Illuminate\Bus; |
4 |
|
5 |
trait Queueable |
6 |
{
|
7 |
/**
|
8 |
* The name of the connection the job should be sent to.
|
9 |
*
|
10 |
* @var string|null
|
11 |
*/
|
12 |
public $connection; |
13 |
|
14 |
/**
|
15 |
* The name of the queue the job should be sent to.
|
16 |
*
|
17 |
* @var string|null
|
18 |
*/
|
19 |
public $queue; |
20 |
|
21 |
/**
|
22 |
* The number of seconds before the job should be made available.
|
23 |
*
|
24 |
* @var \DateTime|int|null
|
25 |
*/
|
26 |
public $delay; |
27 |
|
28 |
/**
|
29 |
* Set the desired connection for the job.
|
30 |
*
|
31 |
* @param string|null $connection
|
32 |
* @return $this
|
33 |
*/
|
34 |
public function onConnection($connection) |
35 |
{
|
36 |
$this->connection = $connection; |
37 |
|
38 |
return $this; |
39 |
}
|
40 |
|
41 |
/**
|
42 |
* Set the desired queue for the job.
|
43 |
*
|
44 |
* @param string|null $queue
|
45 |
* @return $this
|
46 |
*/
|
47 |
public function onQueue($queue) |
48 |
{
|
49 |
$this->queue = $queue; |
50 |
|
51 |
return $this; |
52 |
}
|
53 |
|
54 |
/**
|
55 |
* Set the desired delay for the job.
|
56 |
*
|
57 |
* @param int|null $delay
|
58 |
* @return $this
|
59 |
*/
|
60 |
public function delay($delay) |
61 |
{
|
62 |
$this->delay = $delay; |
63 |
|
64 |
return $this; |
65 |
}
|
66 |
}
|