mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-26 19:46:19 +00:00
multiroutine scrap
This commit is contained in:
parent
f0eeb01b66
commit
d5e7726185
1 changed files with 4 additions and 3 deletions
|
@ -12,6 +12,7 @@ import { getCarrefourProduct } from "./carrefour.js";
|
|||
import { getDiaProduct } from "./dia.js";
|
||||
import { getCotoProduct } from "./coto.js";
|
||||
import { join } from "path";
|
||||
import pMap from "p-map";
|
||||
|
||||
const sqlite = new Database("sqlite.db");
|
||||
const db = drizzle(sqlite);
|
||||
|
@ -33,9 +34,9 @@ create table precios(
|
|||
);
|
||||
`);
|
||||
|
||||
for (const path of process.argv.slice(2)) {
|
||||
await parseWarc(path);
|
||||
}
|
||||
await pMap(process.argv.slice(2), (path) => parseWarc(path), {
|
||||
concurrency: 40,
|
||||
});
|
||||
|
||||
const DEBUG = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue