diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-02-03 15:52:45 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-02-03 15:55:00 -0500 |
| commit | fb2a320416d2b7437a483f6f5ecc42e6f67ff91c (patch) | |
| tree | 19aeda1815891b2df1b79453b6892883cd37ccc4 /MediaBrowser.Server.Startup.Common | |
| parent | 4fc3753f6498351589daa9101bfe98148a57ce42 (diff) | |
update upgrade process
Diffstat (limited to 'MediaBrowser.Server.Startup.Common')
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/ApplicationHost.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index f75aeebdd..7f79653af 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -317,6 +317,11 @@ namespace MediaBrowser.Server.Startup.Common /// <returns>Task.</returns> public override async Task RunStartupTasks() { + if (ServerConfigurationManager.Configuration.MigrationVersion < CleanDatabaseScheduledTask.MigrationVersion) + { + TaskManager.SuspendTriggers = true; + } + await base.RunStartupTasks().ConfigureAwait(false); Logger.Info("ServerId: {0}", SystemId); diff --git a/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs b/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs index 1df49845b..959543893 100644 --- a/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs +++ b/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs @@ -20,13 +20,14 @@ namespace MediaBrowser.Server.Startup.Common.Migrations { if (_config.Configuration.MigrationVersion < CleanDatabaseScheduledTask.MigrationVersion) { + _taskManager.SuspendTriggers = true; CleanDatabaseScheduledTask.EnableUnavailableMessage = true; Task.Run(async () => { await Task.Delay(1000).ConfigureAwait(false); - _taskManager.QueueScheduledTask<CleanDatabaseScheduledTask>(); + _taskManager.Execute<CleanDatabaseScheduledTask>(); }); } } |
