Skip to content
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

Merged
merged 3 commits into from
Mar 11, 2024
Merged

Conversation

GraceRuan
Copy link
Collaborator

No description provided.

@GraceRuan GraceRuan requested a review from mbystedt February 27, 2024 16:54
src/index.ts Outdated
await compress(db);
}

// Stage 3: Backup
Copy link
Collaborator

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 () => {
Copy link
Collaborator

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 {
Copy link
Collaborator

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()}`);
Copy link
Collaborator

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

@GraceRuan GraceRuan requested a review from mbystedt February 27, 2024 19:09
Copy link
Collaborator

@mbystedt mbystedt left a 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.

@GraceRuan GraceRuan requested a review from mbystedt March 4, 2024 18:53
@GraceRuan GraceRuan merged commit 266d7b4 into main Mar 11, 2024
2 checks passed
@GraceRuan GraceRuan deleted the feat/addRunOnce branch March 11, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants