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

fix: sessions from inactive providers can still be used #1458

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

Meierschlumpf
Copy link
Member


Homarr

Thank you for your contribution. Please ensure that your pull request meets the following pull request:

  • Builds without warnings or errors (pnpm buid, autofix with pnpm format:fix)
  • Pull request targets dev branch
  • Commits follow the conventional commits guideline
  • No shorthand variable names are used (eg. x, y, i or any abbrevation)

@Meierschlumpf Meierschlumpf added the bug Something isn't working label Nov 10, 2024
@Meierschlumpf Meierschlumpf self-assigned this Nov 10, 2024
@Meierschlumpf Meierschlumpf requested a review from a team as a code owner November 10, 2024 09:08
Copy link

deepsource-io bot commented Nov 10, 2024

Here's the code health analysis summary for commits fc4cddc..298865d. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link

github-actions bot commented Nov 10, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 22.25% 6458 / 29019
🔵 Statements 22.25% 6458 / 29019
🔵 Functions 24% 246 / 1025
🔵 Branches 60.29% 773 / 1282
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/cron-jobs-core/src/creator.ts 0% 0% 0% 0% 1-112
packages/cron-jobs-core/src/expressions.ts 0% 0% 0% 0% 1-10
packages/cron-jobs-core/src/group.ts 0% 0% 0% 0% 1-74
packages/cron-jobs/src/index.ts 0% 0% 0% 0% 1-31
packages/cron-jobs/src/jobs/session-cleanup.ts 0% 0% 0% 0% 1-34
Generated in workflow #3643 for commit 298865d by the Vitest Coverage Report Action

const userIds = sessionsWithInactiveProviders.map(({ userId }) => userId).filter((value) => value !== null);
await db.delete(sessions).where(inArray(sessions.userId, userIds));

logger.info(`Deleted sessions for inactive providers count=${userIds.length}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only log when count > 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants