mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Add child task support
This commit is contained in:
@@ -37,6 +37,7 @@ export class Cache {
|
||||
categoriesWithModifiedBaseData = new Set<string>()
|
||||
categoriesWithModifiedTimeLimitRules = new Set<string>()
|
||||
categoriesWithModifiedUsedTimes = new Set<string>()
|
||||
categoriesWithModifiedTasks = new Set<string>()
|
||||
|
||||
devicesWithModifiedInstalledApps = new Set<string>()
|
||||
devicesWithModifiedShowDeviceConnected = new Map<string, boolean>()
|
||||
@@ -209,6 +210,22 @@ export class Cache {
|
||||
this.categoriesWithModifiedUsedTimes.clear()
|
||||
}
|
||||
|
||||
if (this.categoriesWithModifiedTasks.size > 0) {
|
||||
await database.category.update({
|
||||
taskListVersion: generateVersionId()
|
||||
}, {
|
||||
where: {
|
||||
familyId,
|
||||
categoryId: {
|
||||
[Sequelize.Op.in]: setToList(this.categoriesWithModifiedTasks)
|
||||
}
|
||||
},
|
||||
transaction
|
||||
})
|
||||
|
||||
this.categoriesWithModifiedUsedTimes.clear()
|
||||
}
|
||||
|
||||
if (this.devicesWithModifiedInstalledApps.size > 0) {
|
||||
await database.device.update({
|
||||
installedAppsVersion: generateVersionId()
|
||||
|
||||
Reference in New Issue
Block a user