Skip to content

Commit

Permalink
add a log
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyek committed Jun 12, 2024
1 parent b78b689 commit c66a47b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
.env.local
tmp/*
3 changes: 3 additions & 0 deletions projects/scrape-txs/src/lib/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export async function run(months: dayjs.Dayjs[]) {
let createTxs: InsertObject<DB, 'bank_txs'>[];
let deleteTxIds: string[];
try {
console.log('beginning');
const result = await (async () => {
if (process.env.BANK_KEY === 'bancoIndustrialGt') {
return await bancoIndustrialScrape({
Expand All @@ -62,7 +63,9 @@ export async function run(months: dayjs.Dayjs[]) {
createTxs = result.createTxs;
deleteTxIds = result.deleteTxIds;
} catch (error) {
console.log('1');
if (error instanceof playwrightErrors.TimeoutError && isLambda()) {
console.log('2');
const zipExtension = '.zip';
const traceAbsolutePath = `/tmp/trace${zipExtension}`;
await context.tracing.stop({ path: traceAbsolutePath });
Expand Down

0 comments on commit c66a47b

Please sign in to comment.