mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
task.run for startup caching + fix admin module unit test failures
This commit is contained in:
parent
7593d3a7e9
commit
b1ea713c77
3 changed files with 14 additions and 5 deletions
|
@ -36,6 +36,7 @@ using PlexRequests.Core.SettingModels;
|
|||
using PlexRequests.Helpers;
|
||||
using PlexRequests.Store;
|
||||
using PlexRequests.Store.Repository;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PlexRequests.Core
|
||||
{
|
||||
|
@ -102,14 +103,14 @@ namespace PlexRequests.Core
|
|||
s.SaveSettings(defaultSettings);
|
||||
}
|
||||
|
||||
public async void CacheQualityProfiles()
|
||||
public void CacheQualityProfiles()
|
||||
{
|
||||
var mc = new MemoryCacheProvider();
|
||||
|
||||
try
|
||||
{
|
||||
CacheSonarrQualityProfiles(mc);
|
||||
CacheCouchPotatoQualityProfiles(mc);
|
||||
Task.Run(() => { CacheSonarrQualityProfiles(mc); });
|
||||
Task.Run(() => { CacheCouchPotatoQualityProfiles(mc); });
|
||||
// we don't need to cache sickrage profiles, those are static
|
||||
// TODO: cache headphones profiles?
|
||||
}
|
||||
|
@ -119,7 +120,7 @@ namespace PlexRequests.Core
|
|||
}
|
||||
}
|
||||
|
||||
private async void CacheSonarrQualityProfiles(MemoryCacheProvider cacheProvider)
|
||||
private void CacheSonarrQualityProfiles(MemoryCacheProvider cacheProvider)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -141,7 +142,7 @@ namespace PlexRequests.Core
|
|||
}
|
||||
}
|
||||
|
||||
private async void CacheCouchPotatoQualityProfiles(MemoryCacheProvider cacheProvider)
|
||||
private void CacheCouchPotatoQualityProfiles(MemoryCacheProvider cacheProvider)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue