mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -07:00
Removed some areas where we clear out the cache. This should help with DB locking #2750
This commit is contained in:
parent
215663df1f
commit
da9c481bb4
19 changed files with 4 additions and 47 deletions
|
@ -26,8 +26,6 @@ namespace Ombi.Notifications
|
|||
MovieRepository = movie;
|
||||
TvRepository = tv;
|
||||
CustomizationSettings = customization;
|
||||
Settings.ClearCache();
|
||||
CustomizationSettings.ClearCache();
|
||||
RequestSubscription = sub;
|
||||
_log = log;
|
||||
AlbumRepository = album;
|
||||
|
@ -55,14 +53,12 @@ namespace Ombi.Notifications
|
|||
|
||||
public async Task NotifyAsync(NotificationOptions model)
|
||||
{
|
||||
Settings.ClearCache();
|
||||
var configuration = await GetConfiguration();
|
||||
await NotifyAsync(model, configuration);
|
||||
}
|
||||
|
||||
public async Task NotifyAsync(NotificationOptions model, Settings.Settings.Models.Settings settings)
|
||||
{
|
||||
Settings.ClearCache();
|
||||
if (settings == null) await NotifyAsync(model);
|
||||
|
||||
var notificationSettings = (T)settings;
|
||||
|
|
|
@ -28,7 +28,6 @@ namespace Ombi.Schedule.Jobs.Emby
|
|||
_repo = repo;
|
||||
_episodeSync = epSync;
|
||||
_metadata = metadata;
|
||||
_settings.ClearCache();
|
||||
}
|
||||
|
||||
private readonly ILogger<EmbyContentSync> _logger;
|
||||
|
|
|
@ -49,7 +49,6 @@ namespace Ombi.Schedule.Jobs.Emby
|
|||
_settings = s;
|
||||
_repo = repo;
|
||||
_avaliabilityChecker = checker;
|
||||
_settings.ClearCache();
|
||||
}
|
||||
|
||||
private readonly ISettingsService<EmbySettings> _settings;
|
||||
|
|
|
@ -50,8 +50,6 @@ namespace Ombi.Schedule.Jobs.Emby
|
|||
_log = log;
|
||||
_embySettings = embySettings;
|
||||
_userManagementSettings = ums;
|
||||
_userManagementSettings.ClearCache();
|
||||
_embySettings.ClearCache();
|
||||
}
|
||||
|
||||
private readonly IEmbyApi _api;
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Hangfire;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Internal;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Ombi.Api.Lidarr;
|
||||
using Ombi.Api.Radarr;
|
||||
using Ombi.Core.Settings;
|
||||
using Ombi.Helpers;
|
||||
using Ombi.Settings.Settings.Models.External;
|
||||
using Ombi.Store.Context;
|
||||
using Ombi.Store.Entities;
|
||||
using Serilog;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
namespace Ombi.Schedule.Jobs.Lidarr
|
||||
|
@ -29,7 +26,6 @@ namespace Ombi.Schedule.Jobs.Lidarr
|
|||
_ctx = ctx;
|
||||
_job = job;
|
||||
_availability = availability;
|
||||
_lidarrSettings.ClearCache();
|
||||
}
|
||||
|
||||
private readonly ISettingsService<LidarrSettings> _lidarrSettings;
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Hangfire;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Internal;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Ombi.Api.Lidarr;
|
||||
using Ombi.Api.Radarr;
|
||||
using Ombi.Core.Settings;
|
||||
using Ombi.Helpers;
|
||||
using Ombi.Settings.Settings.Models.External;
|
||||
using Ombi.Store.Context;
|
||||
using Ombi.Store.Entities;
|
||||
using Serilog;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
namespace Ombi.Schedule.Jobs.Lidarr
|
||||
|
@ -29,7 +26,6 @@ namespace Ombi.Schedule.Jobs.Lidarr
|
|||
_ctx = ctx;
|
||||
_job = background;
|
||||
_albumSync = album;
|
||||
_lidarrSettings.ClearCache();
|
||||
}
|
||||
|
||||
private readonly ISettingsService<LidarrSettings> _lidarrSettings;
|
||||
|
|
|
@ -10,28 +10,23 @@ using Ombi.Schedule.Jobs.Emby;
|
|||
using Ombi.Schedule.Jobs.Plex.Interfaces;
|
||||
using Ombi.Store.Repository;
|
||||
|
||||
namespace Ombi.Schedule.Jobs.Plex
|
||||
namespace Ombi.Schedule.Jobs.Ombi
|
||||
{
|
||||
public class MediaDatabaseRefresh : IMediaDatabaseRefresh
|
||||
{
|
||||
public MediaDatabaseRefresh(ISettingsService<PlexSettings> s, ILogger<MediaDatabaseRefresh> log, IPlexApi plexApi,
|
||||
IPlexContentRepository plexRepo, IPlexContentSync c, IEmbyContentRepository embyRepo, IEmbyContentSync embySync)
|
||||
public MediaDatabaseRefresh(ISettingsService<PlexSettings> s, ILogger<MediaDatabaseRefresh> log,
|
||||
IPlexContentRepository plexRepo, IEmbyContentRepository embyRepo, IEmbyContentSync embySync)
|
||||
{
|
||||
_settings = s;
|
||||
_log = log;
|
||||
_api = plexApi;
|
||||
_plexRepo = plexRepo;
|
||||
_plexContentSync = c;
|
||||
_embyRepo = embyRepo;
|
||||
_embyContentSync = embySync;
|
||||
_settings.ClearCache();
|
||||
}
|
||||
|
||||
private readonly ISettingsService<PlexSettings> _settings;
|
||||
private readonly ILogger _log;
|
||||
private readonly IPlexApi _api;
|
||||
private readonly IPlexContentRepository _plexRepo;
|
||||
private readonly IPlexContentSync _plexContentSync;
|
||||
private readonly IEmbyContentRepository _embyRepo;
|
||||
private readonly IEmbyContentSync _embyContentSync;
|
||||
|
||||
|
|
|
@ -50,9 +50,6 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|||
_emailSettings = emailSettings;
|
||||
_newsletterSettings = newsletter;
|
||||
_userManager = um;
|
||||
_emailSettings.ClearCache();
|
||||
_customizationSettings.ClearCache();
|
||||
_newsletterSettings.ClearCache();
|
||||
_log = log;
|
||||
_lidarrApi = lidarrApi;
|
||||
_lidarrAlbumRepository = albumCache;
|
||||
|
@ -60,8 +57,6 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|||
_ombiSettings = ombiSettings;
|
||||
_plexSettings = plexSettings;
|
||||
_embySettings = embySettings;
|
||||
_ombiSettings.ClearCache();
|
||||
_lidarrSettings.ClearCache();
|
||||
}
|
||||
|
||||
private readonly IPlexContentRepository _plex;
|
||||
|
|
|
@ -5,18 +5,13 @@ using System.IO;
|
|||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Hangfire;
|
||||
using Hangfire.Console;
|
||||
using Hangfire.Server;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
using Ombi.Api.Service;
|
||||
using Ombi.Api.Service.Models;
|
||||
using Ombi.Core.Processor;
|
||||
using Ombi.Core.Settings;
|
||||
using Ombi.Helpers;
|
||||
|
@ -40,7 +35,6 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|||
Settings = s;
|
||||
_processProvider = proc;
|
||||
_appConfig = appConfig;
|
||||
Settings.ClearCache();
|
||||
}
|
||||
|
||||
private ILogger<OmbiAutomaticUpdater> Logger { get; }
|
||||
|
|
|
@ -20,8 +20,6 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|||
_email = provider;
|
||||
_templates = template;
|
||||
_customizationSettings = c;
|
||||
email.ClearCache();
|
||||
_customizationSettings.ClearCache();
|
||||
}
|
||||
|
||||
private readonly ISettingsService<EmailNotificationSettings> _emailSettings;
|
||||
|
|
|
@ -57,7 +57,6 @@ namespace Ombi.Schedule.Jobs.Plex
|
|||
EpisodeSync = epsiodeSync;
|
||||
Metadata = metadataRefresh;
|
||||
Checker = checker;
|
||||
plex.ClearCache();
|
||||
}
|
||||
|
||||
private ISettingsService<PlexSettings> Plex { get; }
|
||||
|
|
|
@ -26,7 +26,6 @@ namespace Ombi.Schedule.Jobs.Plex
|
|||
_api = plexApi;
|
||||
_repo = repo;
|
||||
_availabilityChecker = a;
|
||||
_settings.ClearCache();
|
||||
}
|
||||
|
||||
private readonly ISettingsService<PlexSettings> _settings;
|
||||
|
|
|
@ -24,8 +24,6 @@ namespace Ombi.Schedule.Jobs.Plex
|
|||
_log = log;
|
||||
_plexSettings = plexSettings;
|
||||
_userManagementSettings = ums;
|
||||
_userManagementSettings.ClearCache();
|
||||
_plexSettings.ClearCache();
|
||||
}
|
||||
|
||||
private readonly IPlexApi _api;
|
||||
|
|
|
@ -22,7 +22,6 @@ namespace Ombi.Schedule.Jobs.Radarr
|
|||
RadarrApi = radarrApi;
|
||||
Logger = log;
|
||||
_ctx = ctx;
|
||||
RadarrSettings.ClearCache();
|
||||
}
|
||||
|
||||
private ISettingsService<RadarrSettings> RadarrSettings { get; }
|
||||
|
|
|
@ -22,7 +22,6 @@ namespace Ombi.Schedule.Jobs.SickRage
|
|||
_api = api;
|
||||
_log = l;
|
||||
_ctx = ctx;
|
||||
_settings.ClearCache();
|
||||
}
|
||||
|
||||
private readonly ISettingsService<SickRageSettings> _settings;
|
||||
|
|
|
@ -25,7 +25,6 @@ namespace Ombi.Schedule.Jobs.Sonarr
|
|||
_api = api;
|
||||
_log = l;
|
||||
_ctx = ctx;
|
||||
_settings.ClearCache();
|
||||
}
|
||||
|
||||
private readonly ISettingsService<SonarrSettings> _settings;
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace Ombi.Settings.Settings
|
|||
var model = obj;
|
||||
|
||||
return model;
|
||||
}, DateTime.Now.AddHours(2));
|
||||
}, DateTime.Now.AddHours(5));
|
||||
}
|
||||
|
||||
public bool SaveSettings(T model)
|
||||
|
|
|
@ -23,7 +23,6 @@ namespace Ombi.Controllers.External
|
|||
RadarrApi = radarr;
|
||||
RadarrSettings = settings;
|
||||
Cache = mem;
|
||||
RadarrSettings.ClearCache();
|
||||
}
|
||||
|
||||
private IRadarrApi RadarrApi { get; }
|
||||
|
|
|
@ -22,7 +22,6 @@ namespace Ombi.Controllers.External
|
|||
SonarrApi = sonarr;
|
||||
SonarrV3Api = sonarrv3;
|
||||
SonarrSettings = settings;
|
||||
SonarrSettings.ClearCache();
|
||||
}
|
||||
|
||||
private ISonarrApi SonarrApi { get; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue