From 3449a0b0971459551e70196f9ff02b4cb8db18d9 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Thu, 9 Jan 2025 08:12:53 +0800 Subject: [PATCH] refactor: Remove redundant CSS copy in Dockerfile and clean up WebSocket error logging chore: Change log level for already downloaded pages to debug --- Dockerfile | 1 - routes/api/task.ts | 1 - tasks/download.ts | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5011607..c77c4bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -113,7 +113,6 @@ COPY ./page ./page COPY ./routes ./routes COPY ./scripts ./scripts COPY ./server ./server -COPY ./static/*.css ./static/ COPY ./static/*.ts ./static/ COPY ./static/*.ico ./static/ COPY ./static/*.svg ./static/ diff --git a/routes/api/task.ts b/routes/api/task.ts index 9af9c58..40b3b22 100644 --- a/routes/api/task.ts +++ b/routes/api/task.ts @@ -64,7 +64,6 @@ export const handler: Handlers = { socket.onerror = () => { removeListener(); clearInterval(interval); - logger.error("WebSocket error."); }; socket.onmessage = (e) => { try { diff --git a/tasks/download.ts b/tasks/download.ts index d7f4199..6994eae 100644 --- a/tasks/download.ts +++ b/tasks/download.ts @@ -291,7 +291,7 @@ export async function download_task( } } } - logger.log("Already download page", i.index); + logger.debug("Already download page", i.index); return; } }