From f85ee3e144f03ce86135485f55543fc3e6a4577d Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sat, 6 Jul 2019 08:11:08 +0100 Subject: [PATCH] #2994 Fixed the startup issue --- src/Ombi/Program.cs | 2 -- src/Ombi/Startup.cs | 13 +++++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/Ombi/Program.cs b/src/Ombi/Program.cs index 77e81427e..dd0baa8d4 100644 --- a/src/Ombi/Program.cs +++ b/src/Ombi/Program.cs @@ -20,8 +20,6 @@ namespace Ombi { Console.Title = "Ombi"; - SQLitePCL.raw.sqlite3_config(2); - var host = string.Empty; var storagePath = string.Empty; var baseUrl = string.Empty; diff --git a/src/Ombi/Startup.cs b/src/Ombi/Startup.cs index 796517225..72b212841 100755 --- a/src/Ombi/Startup.cs +++ b/src/Ombi/Startup.cs @@ -4,6 +4,7 @@ using AutoMapper; using AutoMapper.EquivalencyExpression; using Hangfire; using Hangfire.Dashboard; +using Hangfire.MemoryStorage; using Hangfire.SQLite; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; @@ -90,19 +91,15 @@ namespace Ombi services.AddSwagger(); services.AddAppSettingsValues(Configuration); - var i = StoragePathSingleton.Instance; - if (string.IsNullOrEmpty(i.StoragePath)) - { - i.StoragePath = string.Empty; - } - var sqliteStorage = $"Data Source={Path.Combine(i.StoragePath, "Schedules.db")};"; - services.AddHangfire(x => { - x.UseSQLiteStorage(sqliteStorage); + x.UseMemoryStorage(); x.UseActivator(new IoCJobActivator(services.BuildServiceProvider())); }); + + SQLitePCL.raw.sqlite3_config(2); + services.AddCors(o => o.AddPolicy("MyPolicy", builder => { builder.AllowAnyOrigin()