Skip to content

Commit 405c1a5

Browse files
Bug: Don't retry Apprise in case of a timeout (alexjustesen#2680)
Co-authored-by: Alex Justesen <[email protected]>
1 parent 1ada95c commit 405c1a5

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

app/Notifications/Apprise/SpeedtestNotification.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ class SpeedtestNotification extends Notification implements ShouldQueue
1010
{
1111
use Queueable;
1212

13+
/**
14+
* The number of times the job may be attempted.
15+
* Set to 1 to prevent duplicate notifications.
16+
* Apprise may take >30s to respond (timeout), but still processes successfully.
17+
* See #2653 and #2615
18+
*
19+
* @var int
20+
*/
21+
public $tries = 1;
22+
1323
public function __construct(
1424
public string $title,
1525
public string $body,

app/Notifications/Apprise/TestNotification.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ class TestNotification extends Notification implements ShouldQueue
1010
{
1111
use Queueable;
1212

13+
/**
14+
* The number of times the job may be attempted.
15+
* Set to 1 to prevent duplicate notifications.
16+
* Apprise may take >30s to respond (timeout), but still processes successfully.
17+
* See #2653 and #2615
18+
*
19+
* @var int
20+
*/
21+
public $tries = 1;
22+
1323
/**
1424
* Get the notification's delivery channels.
1525
*

app/Notifications/AppriseChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function send(object $notifiable, Notification $notification): void
3838
]);
3939

4040
try {
41-
$request = Http::timeout(30)
41+
$request = Http::timeout(60)
4242
->withHeaders([
4343
'Content-Type' => 'application/json',
4444
]);

0 commit comments

Comments
 (0)