mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-28 17:56:37 +02:00
✨ Set retries for message queue
This commit is contained in:
parent
7c5f4e3692
commit
c161bcdcb0
2 changed files with 4 additions and 1 deletions
|
@ -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,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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"));
|
||||
|
|
Loading…
Add table
Reference in a new issue