-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add options for compress and run once #20
Conversation
src/index.ts
Outdated
await compress(db); | ||
} | ||
|
||
// Stage 3: Backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will never reach stage 3 if compress disabled.
src/index.ts
Outdated
}); | ||
|
||
if (compressEnabled) { | ||
const compressJob = Cron(CRON_COMPRESS, async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove duplication of compress job (and other jobs) code
src/index.ts
Outdated
}; | ||
|
||
if (runOnce) combinedJob(); | ||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is one a function call and the other not?
src/index.ts
Outdated
await compress(db); | ||
runGarbageCollection(); | ||
}); | ||
console.log(`Compress job next run: ${compressJob.nextRun()}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should output after Backup job text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss. Previous commit looked better.
No description provided.