mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-08 16:58:50 +01:00
update migration process
This commit is contained in:
@@ -18,15 +18,21 @@ namespace MediaBrowser.Server.Startup.Common.Migrations
|
||||
|
||||
public void Run()
|
||||
{
|
||||
if (_config.Configuration.MigrationVersion < CleanDatabaseScheduledTask.MigrationVersion &&
|
||||
_config.Configuration.IsStartupWizardCompleted)
|
||||
if (_config.Configuration.MigrationVersion < CleanDatabaseScheduledTask.MigrationVersion)
|
||||
{
|
||||
if (!_config.Configuration.IsStartupWizardCompleted)
|
||||
{
|
||||
_config.Configuration.MigrationVersion = CleanDatabaseScheduledTask.MigrationVersion;
|
||||
_config.SaveConfiguration();
|
||||
return;
|
||||
}
|
||||
|
||||
_taskManager.SuspendTriggers = true;
|
||||
CleanDatabaseScheduledTask.EnableUnavailableMessage = true;
|
||||
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(100).ConfigureAwait(false);
|
||||
await Task.Delay(1000).ConfigureAwait(false);
|
||||
|
||||
_taskManager.Execute<CleanDatabaseScheduledTask>();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user