From bd142354d8b968512b85f1bc77568655ae88c806 Mon Sep 17 00:00:00 2001 From: lyz05 <294068487@qq.com> Date: Fri, 4 Jul 2025 14:55:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=88=A0=E9=99=A4=E4=B8=BA=E5=BC=82=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + routes/danmaku.js | 4 ++-- utils/db.js | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 533ca37..a986f42 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Express框架的性能也比Python的Django要好很多。 # fly.io常用命令 ``` sh +flyctl logs flyctl status flyctl scale count 0 flyctl regions add sea diff --git a/routes/danmaku.js b/routes/danmaku.js index 9fc804d..572f4bb 100644 --- a/routes/danmaku.js +++ b/routes/danmaku.js @@ -116,8 +116,8 @@ router.get("/", async function (req, res) { }); router.get("/delete", async function (req, res) { - const rows = await db.deleteAccess(); - res.send(`删除三个月以前的记录,删除了${rows}条记录`); + const rows = db.deleteAccess(); + res.send(`成功请求删除三个月以前的记录,删除情况请查看日志`); }); module.exports = router; diff --git a/utils/db.js b/utils/db.js index 2a6c4c7..3925838 100644 --- a/utils/db.js +++ b/utils/db.js @@ -117,6 +117,7 @@ async function deleteAccess() { changes += result.changes; // vacuum await run("vacuum"); + console.log("deleteAccess Affect Rows:",changes) return changes; // 提取删除的行数 } catch (err) { console.error('Error during data deletion:', err.message);