Skip to content

Commit

Permalink
chore: activate email recreation
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasCharrier committed Nov 21, 2024
1 parent bdd944e commit 9ff221d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/server/schedulers/cron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ export const jobs: Job[] = [
{
cronTime: "0 */8 * * * *",
onTick: recreateEmailIfUserActive,
isActive: false,
isActive: true,
name: "recreateEmailIfUserActive",
description: "Recreate email for user active again",
},
Expand Down
2 changes: 1 addition & 1 deletion src/server/schedulers/recreateEmailIfUserActive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function recreateEmailIfUserActive() {
for (const dbUser of dbUsers) {
try {
await createEmail(dbUser.username, "Secretariat cron");
console.log(`Create email for ${dbUser.username}`);
console.log(`Recreate email for ${dbUser.username}`);
} catch (e) {
console.error(e);
Sentry.captureException(e);
Expand Down
1 change: 1 addition & 0 deletions src/server/schedulers/userContractEndingScheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ export async function deleteOVHEmailAcounts(
.where("username", "=", user.username)
.set({
primary_email_status: EmailStatusCode.EMAIL_DELETED,
primary_email: null,
})
.execute();
console.log(`Suppression de l'email ovh pour ${user.username}`);
Expand Down

0 comments on commit 9ff221d

Please sign in to comment.