Other processes should now be blocked during database upgrade processes (#128)
This commit is contained in:
@@ -29,6 +29,23 @@ if (Config.ReadSetting("API Key", "Test API Key") == "Test API Key")
|
||||
Config.SetSetting("API Key", APIKey.ToString());
|
||||
}
|
||||
|
||||
// kick off any delayed upgrade tasks
|
||||
// run 1002 background updates in the background on every start
|
||||
DatabaseMigration.BackgroundUpgradeTargetSchemaVersions.Add(1002);
|
||||
// start the task
|
||||
ProcessQueue.QueueItem queueItem = new ProcessQueue.QueueItem(
|
||||
ProcessQueue.QueueItemType.BackgroundDatabaseUpgrade,
|
||||
1,
|
||||
new List<ProcessQueue.QueueItemType>
|
||||
{
|
||||
ProcessQueue.QueueItemType.All
|
||||
},
|
||||
false,
|
||||
true
|
||||
);
|
||||
queueItem.ForceExecute();
|
||||
ProcessQueue.QueueItems.Add(queueItem);
|
||||
|
||||
// set up server
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
@@ -171,13 +188,5 @@ ProcessQueue.QueueItems.Add(new ProcessQueue.QueueItem(
|
||||
})
|
||||
);
|
||||
|
||||
// kick off any delayed upgrade tasks
|
||||
// run 1002 background updates in the background on every start
|
||||
DatabaseMigration.BackgroundUpgradeTargetSchemaVersions.Add(1002);
|
||||
// start the task
|
||||
ProcessQueue.QueueItem queueItem = new ProcessQueue.QueueItem(ProcessQueue.QueueItemType.BackgroundDatabaseUpgrade, 1, false, true);
|
||||
queueItem.ForceExecute();
|
||||
ProcessQueue.QueueItems.Add(queueItem);
|
||||
|
||||
// start the app
|
||||
app.Run();
|
||||
|
Reference in New Issue
Block a user