From a499782ec0dc445abdfd14c7f999c876df901b04 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Tue, 26 Mar 2019 22:12:47 +0000 Subject: [PATCH] Delete the schedules db on startup, we don't want it trying to recover the jobs --- src/Ombi/Program.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Ombi/Program.cs b/src/Ombi/Program.cs index f1809a2dc..2365f6748 100644 --- a/src/Ombi/Program.cs +++ b/src/Ombi/Program.cs @@ -49,6 +49,7 @@ namespace Ombi demoInstance.Demo = demo; instance.StoragePath = storagePath ?? string.Empty; // Check if we need to migrate the settings + DeleteSchedules(); CheckAndMigrate(); var ctx = new SettingsContext(); var config = ctx.ApplicationConfigurations.ToList(); @@ -97,6 +98,20 @@ namespace Ombi CreateWebHostBuilder(args).Build().Run(); } + private static void DeleteSchedules() + { + try + { + if (File.Exists("Schedules.db")) + { + File.Delete("Schedules.db"); + } + } + catch (Exception) + { + } + } + /// /// This is to remove the Settings from the Ombi.db to the "new" /// OmbiSettings.db