Set retries for message queue

This commit is contained in:
Luke Vella 2024-11-30 19:19:15 +00:00
parent 7c5f4e3692
commit c161bcdcb0
No known key found for this signature in database
GPG key ID: 469CAD687F0D784C
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"));