1 | <?php |
||
12 | class OutgoingWebhookJob implements ShouldQueue |
||
13 | { |
||
14 | use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, SendWebhook; |
||
15 | |||
16 | /** |
||
17 | * The webhook data. |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | public $webhookData; |
||
22 | |||
23 | /** |
||
24 | * The Number of times a webhook would be retried. |
||
25 | * |
||
26 | * @var int |
||
27 | */ |
||
28 | public $tries = 5; |
||
29 | |||
30 | /** |
||
31 | * The number of minutes to wait before the webhook will be retried |
||
32 | * |
||
33 | * @var int |
||
34 | */ |
||
35 | public $retryInterval; |
||
36 | |||
37 | /** |
||
38 | * Create a new job instance. |
||
39 | * |
||
40 | * @param array $webhookData |
||
41 | */ |
||
42 | public function __construct(array $webhookData) |
||
48 | |||
49 | /** |
||
50 | * Process the webhook and dispatch it to the URL. |
||
51 | */ |
||
52 | public function handle() |
||
58 | |||
59 | /** |
||
60 | * Retry the webhook job. |
||
61 | */ |
||
62 | private function retryWebhook() |
||
68 | } |
||
69 |