aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Integrations
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-03-15 11:18:08 -0500
committerGitHub <noreply@github.com>2026-03-15 11:18:08 -0500
commit032d9a3513642b85379c6b33a479cb7e0a5adc22 (patch)
tree3d87f453f75d858dfa65c24d1e5fc883916736ff /src/slskd/Integrations
parent0165b5f6cbae759acfe337170f831a11a45634e9 (diff)
parentd1de2611e3662a318d7f1347996e4cd26ae376a3 (diff)
downloadslskd-032d9a3513642b85379c6b33a479cb7e0a5adc22.tar.gz
Merge pull request #1671 from slskd/retry-do
Add the ability to specify base delay for exponential backoff, add onRetry delegate for Retry.Do
Diffstat (limited to 'src/slskd/Integrations')
-rw-r--r--src/slskd/Integrations/FTP/FTPService.cs1
-rw-r--r--src/slskd/Integrations/Pushbullet/PushbulletService.cs1
-rw-r--r--src/slskd/Integrations/Webhooks/WebhookService.cs1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/slskd/Integrations/FTP/FTPService.cs b/src/slskd/Integrations/FTP/FTPService.cs
index cb2b3a3f..ebf34708 100644
--- a/src/slskd/Integrations/FTP/FTPService.cs
+++ b/src/slskd/Integrations/FTP/FTPService.cs
@@ -76,6 +76,7 @@ namespace slskd.Integrations.FTP
isRetryable: (attempts, ex) => true,
onFailure: (attempts, ex) => Log.LogInformation("Failed attempt #{Attempts} to upload {Filename} to FTP: {Message}", attempts, fileAndParentDirectory, ex.Message),
maxAttempts: FtpOptions.RetryAttempts,
+ baseDelayInMilliseconds: 1000,
maxDelayInMilliseconds: 30000);
}
catch (RetryException ex)
diff --git a/src/slskd/Integrations/Pushbullet/PushbulletService.cs b/src/slskd/Integrations/Pushbullet/PushbulletService.cs
index 29033381..4c9df98c 100644
--- a/src/slskd/Integrations/Pushbullet/PushbulletService.cs
+++ b/src/slskd/Integrations/Pushbullet/PushbulletService.cs
@@ -153,6 +153,7 @@ namespace slskd.Integrations.Pushbullet
isRetryable: (attempts, ex) => true,
onFailure: (attempts, ex) => Log.LogWarning("Failed attempt #{Attempts} to send Pushbullet notification {Title} {Body}: {Message}", attempts, title, body, ex.Message),
maxAttempts: PushbulletOptions.RetryAttempts,
+ baseDelayInMilliseconds: 1000,
maxDelayInMilliseconds: 30000);
Log.LogInformation("Sent Pushbullet notification {Title} {Body}", title, body);
diff --git a/src/slskd/Integrations/Webhooks/WebhookService.cs b/src/slskd/Integrations/Webhooks/WebhookService.cs
index 62739d7a..8a009623 100644
--- a/src/slskd/Integrations/Webhooks/WebhookService.cs
+++ b/src/slskd/Integrations/Webhooks/WebhookService.cs
@@ -125,6 +125,7 @@ public class WebhookService
}
},
maxAttempts: webhook.Value.Retry.Attempts,
+ baseDelayInMilliseconds: 1000,
maxDelayInMilliseconds: 30000);
sw.Stop();