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

@@ -52,7 +52,10 @@
itemTypeName = "Library scan";
break;
case 'CollectionCompiler':
itemTypeName = "Compress collections";
itemTypeName = "Compress collection id: " + result[i].options;
break;
case 'BackgroundDatabaseUpgrade':
itemTypeName = "Background database upgrade";
break;
default:
itemTypeName = result[i].itemType;
@@ -80,17 +83,24 @@
break;
}
var itemInterval = result[i].interval;
var nextRunTime = moment(result[i].nextRunTime).fromNow();
var startButton = '';
if (result[i].allowManualStart == true && result[i].itemState != "Running") {
startButton = "<span id='startProcess' class='romstart' onclick='StartProcess(\"" + result[i].itemType + "\");'>Start</span>";
}
if (result[i].allowManualStart == false && result[i].removeWhenStopped == true) {
itemInterval = '';
nextRunTime = '';
}
var newRow = [
itemTypeName,
itemStateName,
result[i].interval,
itemInterval,
itemLastStart,
moment(result[i].nextRunTime).fromNow(),
nextRunTime,
startButton
];
newTable.appendChild(createTableRow(false, newRow, 'romrow', 'romcell'));