Close database connections in housekeeping tasks

pull/1672/head
Bogdan 1 year ago
parent 46d930e903
commit a3ccc3d0cf

@ -14,8 +14,7 @@ namespace NzbDrone.Core.Housekeeping.Housekeepers
public void Clean()
{
var mapper = _database.OpenConnection();
using var mapper = _database.OpenConnection();
mapper.Execute(@"DELETE FROM ""ApplicationStatus""
WHERE ""Id"" IN (
SELECT ""ApplicationStatus"".""Id"" FROM ""ApplicationStatus""

@ -14,8 +14,7 @@ namespace NzbDrone.Core.Housekeeping.Housekeepers
public void Clean()
{
var mapper = _database.OpenConnection();
using var mapper = _database.OpenConnection();
mapper.Execute(@"DELETE FROM ""DownloadClientStatus""
WHERE ""Id"" IN (
SELECT ""DownloadClientStatus"".""Id"" FROM ""DownloadClientStatus""

Loading…
Cancel
Save