diff options
| author | JP Dillingham <jp@dillingham.me> | 2023-09-17 16:40:58 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2023-09-17 16:40:58 -0500 |
| commit | 98536d94108044b709658895782ba25d5693825b (patch) | |
| tree | 8fef2b93295005f3ae605b214732fd27646de034 | |
| parent | 5e79b99824ef85832ee9399b149c46c3b35d8411 (diff) | |
| download | slskd-98536d94108044b709658895782ba25d5693825b.tar.gz | |
make retention options nullable, and in minutes
| -rw-r--r-- | config/slskd.example.yml | 12 | ||||
| -rw-r--r-- | src/slskd/Core/Options.cs | 18 |
2 files changed, 15 insertions, 15 deletions
diff --git a/config/slskd.example.yml b/config/slskd.example.yml index 5b7ea7ae..2c22d020 100644 --- a/config/slskd.example.yml +++ b/config/slskd.example.yml @@ -109,13 +109,13 @@ # cidr: 0.0.0.0/0,::/0 # retention: # upload: -# succeeded: 2147483647 -# errored: 2147483647 -# cancelled: 2147483647 +# succeeded: 1440 # 1 day +# errored: 30 +# cancelled: 5 # download: -# succeeded: 2147483647 -# errored: 2147483647 -# cancelled: 2147483647 +# succeeded: 1440 # 1 day +# errored: 20160 # 2 weeks +# cancelled: 5 # logger: # loki: ~ # metrics: diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 7e21865f..30297cac 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -1077,22 +1077,22 @@ namespace slskd public class TransferRetentionOptions { /// <summary> - /// Gets the time to retain successful transfers, in hours. + /// Gets the time to retain successful transfers, in minutes. /// </summary> - [Range(1, maximum: int.MaxValue)] - public int Succeeded { get; init; } = int.MaxValue; + [Range(5, maximum: int.MaxValue)] + public int? Succeeded { get; init; } = null; /// <summary> - /// Gets the time to retain errored transfers, in hours. + /// Gets the time to retain errored transfers, in minutes. /// </summary> - [Range(1, maximum: int.MaxValue)] - public int Errored { get; init; } = int.MaxValue; + [Range(5, maximum: int.MaxValue)] + public int? Errored { get; init; } = null; /// <summary> - /// Gets the time to retain cancelled transfers, in hours. + /// Gets the time to retain cancelled transfers, in minutes. /// </summary> - [Range(1, maximum: int.MaxValue)] - public int Cancelled { get; init; } = int.MaxValue; + [Range(5, maximum: int.MaxValue)] + public int? Cancelled { get; init; } = null; } } |
