aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-03-08 18:38:51 -0500
committerJP Dillingham <jp@dillingham.me>2026-03-08 18:38:51 -0500
commit8e096e0c7c3c2808cdf316a809ba2568c55988ce (patch)
treee38ba7ad5c9d1382ac54528538e37aaa6ee7ff12 /src
parent1e6ef0791e2f6a4cbbec72573a52afc62e4717d8 (diff)
downloadslskd-8e096e0c7c3c2808cdf316a809ba2568c55988ce.tar.gz
ready report queries for retries
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Telemetry/ReportsService.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/slskd/Telemetry/ReportsService.cs b/src/slskd/Telemetry/ReportsService.cs
index da325dc0..2c9308ad 100644
--- a/src/slskd/Telemetry/ReportsService.cs
+++ b/src/slskd/Telemetry/ReportsService.cs
@@ -23,6 +23,7 @@ using System.Linq;
using Dapper;
using Microsoft.Data.Sqlite;
using Serilog;
+using slskd.Transfers;
using Soulseek;
/// <summary>
@@ -84,6 +85,7 @@ public class ReportsService
FROM Transfers
WHERE EndedAt IS NOT NULL
AND EndedAt BETWEEN @Start AND @End
+ AND State IN ({string.Join(", ", TransferStateCategories.Completed.Select(s => (int)s))})
{(direction is not null ? "AND Direction = @Direction" : string.Empty)}
{(username is not null ? "AND Username = @Username" : string.Empty)}
GROUP BY Direction, StateDescription
@@ -171,6 +173,7 @@ public class ReportsService
FROM Transfers
WHERE EndedAt IS NOT NULL
AND EndedAt BETWEEN @Start AND @End
+ AND State IN ({string.Join(", ", TransferStateCategories.Completed.Select(s => (int)s))})
{(direction is not null ? "AND Direction = @Direction" : string.Empty)}
{(username is not null ? "AND Username = @Username" : string.Empty)}
GROUP BY Interval, Direction, StateDescription