mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-21 02:07:23 +02:00
✨ Set retries for message queue (#1448)
This commit is contained in:
parent
7c5f4e3692
commit
3f405003fd
2 changed files with 4 additions and 1 deletions
|
@ -5,5 +5,7 @@ export function createQstashClient() {
|
||||||
return null;
|
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({
|
.enqueueJSON({
|
||||||
url: absoluteUrl("/api/send-email"),
|
url: absoluteUrl("/api/send-email"),
|
||||||
body: { locale: this.config.locale, templateName, options },
|
body: { locale: this.config.locale, templateName, options },
|
||||||
|
retries: 2,
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
Sentry.captureException(new Error("Failed to queue email"));
|
Sentry.captureException(new Error("Failed to queue email"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue