Set retries for message queue (#1448)

This commit is contained in:
Luke Vella 2024-11-30 19:24:36 +00:00 committed by GitHub
parent 7c5f4e3692
commit 3f405003fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -5,5 +5,7 @@ export function createQstashClient() {
return null;
}
return new Client({ token: process.env.QSTASH_TOKEN });
return new Client({
token: process.env.QSTASH_TOKEN,
});
}

View file

@ -84,6 +84,7 @@ export class EmailClient {
.enqueueJSON({
url: absoluteUrl("/api/send-email"),
body: { locale: this.config.locale, templateName, options },
retries: 2,
})
.catch(() => {
Sentry.captureException(new Error("Failed to queue email"));