Skip to content

Commit

Permalink
desactivar sql porque crashea en triggerdev
Browse files Browse the repository at this point in the history
  • Loading branch information
catdevnull committed Dec 23, 2024
1 parent 70df315 commit 056ade5
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions trigger/scrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,27 @@ export const scrapAerolineasTask = schemaTask({
entries: datas,
};

const columns = sql.identifier([
"url",
"fetched_at",
"b2_raw_path",
"airport_iata",
"flights_relative_to_airport",
"date",
"entries",
]);
const values = sql.values([
[
snapshot.url,
snapshot.fetched_at,
snapshot.b2_raw_path,
snapshot.airport_iata,
snapshot.flights_relative_to_airport,
snapshot.date,
JSON.stringify(snapshot.entries),
],
]);
await sql`insert into aerolineas_snapshots (${columns}) values ${values}`;
// const columns = sql.identifier([
// "url",
// "fetched_at",
// "b2_raw_path",
// "airport_iata",
// "flights_relative_to_airport",
// "date",
// "entries",
// ]);
// const values = sql.values([
// [
// snapshot.url,
// snapshot.fetched_at,
// snapshot.b2_raw_path,
// snapshot.airport_iata,
// snapshot.flights_relative_to_airport,
// snapshot.date,
// JSON.stringify(snapshot.entries),
// ],
// ]);
// await sql`insert into aerolineas_snapshots (${columns}) values ${values}`;
}
});
}
Expand Down

0 comments on commit 056ade5

Please sign in to comment.