Skip to content

Commit 39a8453

Browse files
authored
set retry count and timeout
1 parent ec69211 commit 39a8453

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/SendJob.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ class SendJob implements ShouldQueue
1414
{
1515
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
1616

17+
// Set the maximum number of retries
18+
public $tries = 2;
19+
20+
// Set the retry delay (in seconds)
21+
public $retryAfter = 120;
22+
1723
public function __construct(
1824
private string $url,
1925
private string $message,
@@ -33,6 +39,8 @@ public function handle(): void
3339
$httpClientOption['proxy'] = $this->proxy;
3440
}
3541

42+
$httpClientOption['timeout'] = 5;
43+
3644
$params = [
3745
'text' => $this->message,
3846
'chat_id' => $this->chatId,

0 commit comments

Comments
 (0)