Signature ingestor database update is now a background task (#121)

* Updated background task code to support options and self clearing

* Moved background safe database upgrade code to a background task
This commit is contained in:
Michael Green
2023-09-20 00:35:24 +10:00
committed by GitHub
parent 60fab488a2
commit 7eb418d6a2
7 changed files with 239 additions and 160 deletions

View File

@@ -170,7 +170,14 @@ ProcessQueue.QueueItems.Add(new ProcessQueue.QueueItem(
ProcessQueue.QueueItemType.OrganiseLibrary
})
);
ProcessQueue.QueueItems.Add(new ProcessQueue.QueueItem(ProcessQueue.QueueItemType.CollectionCompiler, 5, false));
// 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();