Add retry mechanism and failure notifications for nCore/qBittorrent setup

- Implemented a retry mechanism for external calls, allowing up to 3 attempts before failing.
- Enhanced error handling to send failure notifications when setup steps fail, including detailed error messages.
- Updated RunSummary model to include status, error step, and error message fields for better tracking of run outcomes.
- Modified database schema to store failure metadata for runs.
- Updated README.md to reflect changes in error handling and notification behavior.
This commit is contained in:
Zsolt Alföldi
2026-05-07 12:03:00 +02:00
parent 696d0227a3
commit 89835b237c
6 changed files with 268 additions and 41 deletions

View File

@@ -48,6 +48,9 @@ type ActionResult struct {
type RunSummary struct {
StartedAt time.Time `json:"started_at"`
Status string `json:"status"`
ErrorStep string `json:"error_step,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
DryRun bool `json:"dry_run"`
TotalRisk int `json:"total_risk"`
Matched int `json:"matched"`
@@ -65,6 +68,9 @@ type StatusCount struct {
type RunRecord struct {
StartedAt string `json:"started_at"`
Status string `json:"status"`
ErrorStep string `json:"error_step,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
DryRun bool `json:"dry_run"`
TotalRisk int `json:"total_risk"`
Matched int `json:"matched"`