Backporting a bunch of optimizations from db-only branch

This commit is contained in:
Zef Hemel
2024-01-13 17:30:15 +01:00
parent 509ece91f0
commit bf1eb03129
24 changed files with 264 additions and 104 deletions
+3 -1
View File
@@ -9,7 +9,9 @@ export async function completeTaskState(completeEvent: CompleteEvent) {
if (!taskMatch) {
return null;
}
const allStates = await queryObjects<TaskStateObject>("taskstate", {});
const allStates = await queryObjects<TaskStateObject>("taskstate", {
cacheSecs: 5,
});
const states = [...new Set(allStates.map((s) => s.state))];
return {