feat: storage disk - actions + daily backup

This commit is contained in:
Nick
2019-04-07 17:00:42 -04:00
parent 6ea3ff11ea
commit e2518c7a8d
5 changed files with 79 additions and 2 deletions

View File

@@ -142,6 +142,16 @@ module.exports = class Storage extends Model {
repeat: true
}, target.key)
}
// -> Set internal recurring sync job
if (targetDef.intervalSchedule && targetDef.intervalSchedule !== `P0D`) {
WIKI.scheduler.registerJob({
name: `sync-storage`,
immediate: false,
schedule: target.intervalSchedule,
repeat: true
}, target.key)
}
} catch (err) {
// -> Save initialization error
await WIKI.models.storage.query().patch({