Skip to content

Commit

Permalink
chore: address pull request feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Meierschlumpf committed Nov 16, 2024
1 parent 298865d commit 5be2fcf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/cron-jobs/src/jobs/session-cleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,9 @@ export const sessionCleanupJob = createCronJob("sessionCleanup", NEVER, {
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}`);
if (sessionsWithInactiveProviders.length > 0) {
logger.info(`Deleted sessions for inactive providers count=${userIds.length}`);
} else {
logger.debug("No sessions to delete");
}
});

0 comments on commit 5be2fcf

Please sign in to comment.