Playing around with stuff

This commit is contained in:
J Francisco Rader authored and J Francisco Rader committed 2021-03-30 02:07:56 -03:00
1 parent 282e99df18
commit 04670233bc
9 files changed
+98 -37

No files matched your search

+3 -2
View File
@@ -120,12 +120,13 @@ onNet(events.EMAIL_FETCH_INBOX, async () => {
try {
const email = '[email protected]';
const messages = await fetchInbox(email);
await new Promise((res) => setTimeout(res, 6000));
const inbox = getEmailsFromMessages(messages, email);
emitNet(events.EMAIL_FETCH_INBOX_SUCCESS, inbox);
emitNet(events.EMAIL_FETCH_INBOX_SUCCESS, _source, inbox);
} catch (e) {
emailLogger.error(`Failed to fetch email inbox, ${e.message}`, {
source: _source,
});
emitNet(events.EMAIL_FETCH_INBOX_ERROR, e);
emitNet(events.EMAIL_FETCH_INBOX_ERROR, _source, e);
}
});