diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-11-02 12:25:01 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-11-02 12:25:01 -0500 |
| commit | fbf8d27637a0b3804cf31665425be372420097a5 (patch) | |
| tree | 423195f44950bdd256f1e0fa7ebb41dc5df9630a /MediaBrowser.Server.Startup.Common | |
| parent | a5f2e21ca4feeacfa5afa88d20ae90f51b794593 (diff) | |
update channel db
Diffstat (limited to 'MediaBrowser.Server.Startup.Common')
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/ApplicationHost.cs | 14 | ||||
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs | 14 |
2 files changed, 17 insertions, 11 deletions
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index 694bd1b798..6fc25f24c3 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -640,11 +640,19 @@ namespace MediaBrowser.Server.Startup.Common /// <returns>Task{IUserRepository}.</returns> private async Task<IUserRepository> GetUserRepository() { - var repo = new SqliteUserRepository(LogManager, ApplicationPaths, JsonSerializer); + try + { + var repo = new SqliteUserRepository(LogManager, ApplicationPaths, JsonSerializer); - await repo.Initialize().ConfigureAwait(false); + await repo.Initialize().ConfigureAwait(false); - return repo; + return repo; + } + catch (Exception ex) + { + Logger.ErrorException("Error opening user db", ex); + throw; + } } /// <summary> diff --git a/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs b/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs index de7cba68d3..cdb69025a1 100644 --- a/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs +++ b/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs @@ -20,15 +20,13 @@ namespace MediaBrowser.Server.Startup.Common.Migrations { if (_config.Configuration.MigrationVersion < CleanDatabaseScheduledTask.MigrationVersion) { - return; - } - - Task.Run(async () => - { - await Task.Delay(2000).ConfigureAwait(false); + Task.Run(async () => + { + await Task.Delay(2000).ConfigureAwait(false); - _taskManager.QueueScheduledTask<CleanDatabaseScheduledTask>(); - }); + _taskManager.QueueScheduledTask<CleanDatabaseScheduledTask>(); + }); + } } } } |
