Compare commits

..

2 commits

Author SHA1 Message Date
Nulo
5d37ca01e8 devcontainer 2023-12-27 03:53:41 +00:00
Nulo
c523cea9be agregar todo para resilencia 2023-12-27 03:51:57 +00:00
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,26 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine
{
"name": "Alpine",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"ghcr.io/shyim/devcontainers-features/bun:0": {},
"ghcr.io/devcontainers/features/git-lfs:1": {}
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y zstd",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

View file

@ -48,6 +48,7 @@ export async function parseWarc(path: string) {
const warc = Bun.spawn(["zstd", "-do", "/dev/stdout", path], { const warc = Bun.spawn(["zstd", "-do", "/dev/stdout", path], {
stderr: "ignore", stderr: "ignore",
}).stdout; }).stdout;
// TODO: tirar error si falla zstd
const parser = new WARCParser(warc); const parser = new WARCParser(warc);
for await (const record of parser) { for await (const record of parser) {