mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-07 00:08:29 +01:00
Merge pull request #4326 from crobibero/purge-activity-log
Automatically clean activity log database
This commit is contained in:
@@ -16,5 +16,12 @@ namespace MediaBrowser.Model.Activity
|
||||
Task CreateAsync(ActivityLog entry);
|
||||
|
||||
Task<QueryResult<ActivityLogEntry>> GetPagedResultAsync(ActivityLogQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Remove all activity logs before the specified date.
|
||||
/// </summary>
|
||||
/// <param name="startDate">Activity log start date.</param>
|
||||
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
|
||||
Task CleanAsync(DateTime startDate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,6 +271,11 @@ namespace MediaBrowser.Model.Configuration
|
||||
/// </summary>
|
||||
public string[] KnownProxies { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of days we should retain activity logs.
|
||||
/// </summary>
|
||||
public int? ActivityLogRetentionDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
|
||||
/// </summary>
|
||||
@@ -381,6 +386,7 @@ namespace MediaBrowser.Model.Configuration
|
||||
SlowResponseThresholdMs = 500;
|
||||
CorsHosts = new[] { "*" };
|
||||
KnownProxies = Array.Empty<string>();
|
||||
ActivityLogRetentionDays = 30;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user