Temp send email auto without cron
This commit is contained in:
parent
a125f3482c
commit
254b5cb374
@ -132,8 +132,9 @@ export default class EmailBuilder {
|
||||
nbTrySend: null,
|
||||
lastTrySendDate: null,
|
||||
});
|
||||
this.mailchimpService.sendEmails();
|
||||
});
|
||||
|
||||
if(this.variables.ENV !== "dev") await this.mailchimpService.sendEmails();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ export default class MailchimpService extends BaseService {
|
||||
* @throws {Error} If email cannot be sent
|
||||
*/
|
||||
public async sendEmails() {
|
||||
const emailsToSend = await this.get({ where: { sentAt: null } });
|
||||
const emailsToSend = await this.get({ where: { sentAt: null } });
|
||||
const currentDate = new Date();
|
||||
let nextTrySendDate = null;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user