Update:Remove node-cron dependency

This commit is contained in:
advplyr 2022-06-07 20:04:51 -05:00
parent 26ef275ab4
commit b7e546f2f5
19 changed files with 686 additions and 18 deletions

View file

@ -1,6 +1,6 @@
const Path = require('path')
const cron = require('node-cron')
const cron = require('../libs/nodeCron')
const fs = require('fs-extra')
const archiver = require('archiver')
const StreamZip = require('node-stream-zip')
@ -276,7 +276,7 @@ class BackupManager {
reject(err)
})
archive.on('progress', ({ fs: fsobj }) => {
const maxBackupSizeInBytes = this.serverSettings.maxBackupSize * 1000 * 1000 * 1000
const maxBackupSizeInBytes = this.serverSettings.maxBackupSize * 1000 * 1000 * 1000
if (fsobj.processedBytes > maxBackupSizeInBytes) {
Logger.error(`[BackupManager] Archiver is too large - aborting to prevent endless loop, Bytes Processed: ${fsobj.processedBytes}`)
archive.abort()