mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2025-10-04 10:19:26 +02:00
Add child task support
This commit is contained in:
parent
020fe0aea6
commit
d67b7a7619
73 changed files with 2864 additions and 88 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue