sleep
This commit is contained in:
parent
0c337bdbe6
commit
500e6f5725
@ -299,6 +299,11 @@ async function processEmailTask(task, topic) {
|
|||||||
|
|
||||||
console.log(`[DynamicConsumer] DeliveryLog updated for campaign ${task.campaignId}, subscriber ${task.subscriberId}`);
|
console.log(`[DynamicConsumer] DeliveryLog updated for campaign ${task.campaignId}, subscriber ${task.subscriberId}`);
|
||||||
|
|
||||||
|
// Засыпаем на 60 секунд после отправки
|
||||||
|
console.log(`[DynamicConsumer] Sleeping for 60 seconds after sending email to ${task.email}`);
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 60000));
|
||||||
|
console.log(`[DynamicConsumer] Woke up after 60 seconds sleep`);
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Error sending email:', err, 'task:', task);
|
console.error('Error sending email:', err, 'task:', task);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user