feat: add email test, fix memory leak (#24)

Co-authored-by: Jef LeCompte <jeffreylec@gmail.com>
This commit is contained in:
DakkJaniels
2020-09-18 18:06:40 -04:00
committed by GitHub
parent c0a881a16e
commit a2fb97333c
3 changed files with 12 additions and 2 deletions
+8
View File
@@ -5,6 +5,13 @@ import open from 'open';
import sendNotification from './notification';
import {Logger} from './logger';
/**
* Send test email.
*/
if (Config.email.test === 'true') {
sendNotification('test');
}
/**
* Starts the bot.
*/
@@ -45,6 +52,7 @@ async function lookup(store: Store) {
await page.goto(link.url, {waitUntil: 'networkidle0'});
} catch {
Logger.error(`✖ [${store.name}] ${graphicsCard} skipping; timed out`);
await browser.close();
return;
}