mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Data backuping every day, and on server startup
This commit is contained in:
parent
7a41281993
commit
a880d67eae
4 changed files with 57 additions and 39 deletions
|
@ -137,13 +137,18 @@ function GetApp() {
|
|||
|
||||
function userSpecificMotdSeenBy(id) {
|
||||
if (!userSpecificMotd[id].seen) {
|
||||
logger.Log(`User #${id}'s user specific motd is now seen.`, logger.GetColor('bluebg'))
|
||||
logger.Log(
|
||||
`User #${id}'s user specific motd is now seen.`,
|
||||
logger.GetColor('bluebg')
|
||||
)
|
||||
userSpecificMotd[id].seen = true
|
||||
utils.WriteFile(JSON.stringify(userSpecificMotd), userSpecificMotdFile)
|
||||
}
|
||||
}
|
||||
|
||||
function Load() {
|
||||
actions.backupData(data)
|
||||
|
||||
utils.WatchFile(userSpecificMotdFile, (newData) => {
|
||||
logger.Log(`User Specific Motd changed: ${newData.replace(/\/n/g, '')}`)
|
||||
LoadUserSpecificMOTD()
|
||||
|
@ -985,8 +990,9 @@ function GetApp() {
|
|||
}
|
||||
|
||||
function DailyAction() {
|
||||
ExportDailyDataCount()
|
||||
actions.backupData(data)
|
||||
BackupDB()
|
||||
ExportDailyDataCount()
|
||||
IncrementAvaiblePWs()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue