Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
SendSignatureRemindersJob
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 handle
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace ImovelZapAi\Signatures\Infrastructure\Jobs;
6
7use Illuminate\Bus\Queueable;
8use Illuminate\Contracts\Queue\ShouldQueue;
9use Illuminate\Foundation\Bus\Dispatchable;
10use Illuminate\Queue\InteractsWithQueue;
11use Illuminate\Queue\SerializesModels;
12use ImovelZapAi\Signatures\Application\Actions\RemindPendingSignersAction;
13
14final class SendSignatureRemindersJob implements ShouldQueue
15{
16    use Dispatchable;
17    use InteractsWithQueue;
18    use Queueable;
19    use SerializesModels;
20
21    public int $tries = 3;
22
23    /** @var list<int> */
24    public array $backoff = [30, 60, 120];
25
26    public int $timeout = 120;
27
28    public function __construct(
29        public readonly ?string $requestId = null,
30    ) {
31        $this->onQueue((string) config('signatures.queue', 'signatures'));
32    }
33
34    public function handle(RemindPendingSignersAction $action): void
35    {
36        $action->execute($this->requestId);
37    }
38}