kuwoMusicApi icon indicating copy to clipboard operation
kuwoMusicApi copied to clipboard

关于日志文件无法自动删除问题

Open super963883929 opened this issue 1 year ago • 20 comments

这项目跑起来日志文件不会自动删除,跑了一晚上把我200多G的磁盘跑满了

super963883929 avatar Apr 30 '23 03:04 super963883929

加了一个定时任务,自动删除logs

qyhqiu avatar Jul 22 '23 06:07 qyhqiu

最近好多接口都失效了,现在的版本是不是修复好了?

super963883929 avatar Jul 22 '23 06:07 super963883929

最近好多接口都失效了,现在的版本是不是修复好了?

官网 接口加密了 Secret, 请求头多了一个 Secret 字段,加上去就好了, 现在所有的接口都可以请求了

定时任务删除日志 默认设置的 24h 删除一次, 你可以自己更改设置 文件地址: \app\schedule\logs.ts const fse = require('fs-extra') // https://www.eggjs.org/zh-CN/basics/schedule#%E5%AE%9A%E6%97%B6%E6%96%B9%E5%BC%8F module.exports = app => { return { schedule: { // 每 24 h 清除 logs interval: '86440s', type: 'all', // 指定所有的 worker 都需要执行 }, async task () { fse.emptydirSync(app.config?.logger?.dir, err => { if (!err) { return console.log('emptydirSync success') } }) }, } }

qyhqiu avatar Jul 22 '23 07:07 qyhqiu

好的,还有一个我在本地用你最新的版本按照步骤到: npm run start以后就报: ` > [email protected] start

egg-scripts start --daemon --port 7002 --title=egg-server-server-egg

[egg-scripts] Starting egg application at C:\Users\a\Desktop\test\kuwoMusicApi-master [egg-scripts] Run node --no-deprecation --require C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\source-map-support\register.js C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-scripts\lib\start-cluster {"port":7002,"title":"egg-server-server-egg","baseDir":"C:\Users\a\Desktop\test\kuwoMusicApi-master","framework":"C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg"} --title=egg-server-server-egg [egg-scripts] Save log file to C:\Users\a\logs [egg-scripts] Wait Start: 1... [egg-scripts] Wait Start: 2... [egg-scripts] Wait Start: 3... [egg-scripts] Wait Start: 4... [egg-scripts] Wait Start: 5... [egg-scripts] Wait Start: 6... [egg-scripts] Wait Start: 7... [egg-scripts] Wait Start: 8... [egg-scripts] Wait Start: 9... [egg-scripts] Wait Start: 10... [egg-scripts] Wait Start: 11... [egg-scripts] tail -n 100 C:\Users\a\logs\master-stderr.log [egg-scripts] Got error when startup: [egg-scripts] at Function.Module._load (node:internal/modules/cjs/loader:822:12) [egg-scripts] at Module.require (node:internal/modules/cjs/loader:1005:19) [egg-scripts] code: "MODULE_NOT_FOUND" [egg-scripts] requireStack: ["C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\BaseService.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\albumInfo.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\lib\utils\index.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\lib\egg.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\index.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg\lib\application.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg\index.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-cluster\lib\app_worker.js"] [egg-scripts] name: "MODULE_NOT_FOUNDError" [egg-scripts] pid: 17552 [egg-scripts] hostname: DESKTOP-2FLB9GC [egg-scripts] [egg-scripts] MODULE_NOT_FOUNDError: [egg-core] load file: C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\albumInfo.js, error: Cannot find module '../utils/secret' [egg-scripts] Require stack: [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\BaseService.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\albumInfo.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\lib\utils\index.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\lib\egg.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\index.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg\lib\application.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg\index.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-cluster\lib\app_worker.js [egg-scripts] at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) [egg-scripts] at Function.Module._load (node:internal/modules/cjs/loader:778:27) [egg-scripts] at Module.require (node:internal/modules/cjs/loader:1005:19) [egg-scripts] at require (node:internal/modules/cjs/helpers:102:18) [egg-scripts] at Object. (C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\BaseService.ts:4:1) [egg-scripts] at Module._compile (node:internal/modules/cjs/loader:1103:14) [egg-scripts] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10) [egg-scripts] at Module.load (node:internal/modules/cjs/loader:981:32) [egg-scripts] at Function.Module._load (node:internal/modules/cjs/loader:822:12) [egg-scripts] at Module.require (node:internal/modules/cjs/loader:1005:19) [egg-scripts] 2023-07-22 15:12:25,152 ERROR 4400 nodejs.AppWorkerDiedError: [master] app_worker#4:16844 died (code: 1, signal: null, suicide: false, state: dead), current workers: ["1","2","3","5","6","7","8","9","10","11","12"] [egg-scripts] at Master.onAppExit (C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-cluster\lib\master.js:510:21) [egg-scripts] at Master.emit (node:events:526:28) [egg-scripts] at Messenger.sendToMaster (C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-cluster\lib\utils\messenger.js:137:17) [egg-scripts] at Messenger.send (C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-cluster\lib\utils\messenger.js:102:12) [egg-scripts] at EventEmitter. (C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-cluster\lib\master.js:353:22) [egg-scripts] at EventEmitter.emit (node:events:538:35) [egg-scripts] at ChildProcess. (node:internal/cluster/primary:203:13) [egg-scripts] at Object.onceWrapper (node:events:646:26) [egg-scripts] at ChildProcess.emit (node:events:526:28) [egg-scripts] at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) [egg-scripts] name: "AppWorkerDiedError" [egg-scripts] pid: 4400 [egg-scripts] hostname: DESKTOP-2FLB9GC [egg-scripts] [egg-scripts] 2023-07-22 15:12:25,152 ERROR 4400 [master] app_worker#4:16844 start fail, exiting with code:1 [egg-scripts] 2023-07-22 15:12:25,153 ERROR 4400 [master] exit with code:1 [egg-scripts] 2023-07-22 15:12:25,154 ERROR 18180 nodejs.MODULE_NOT_FOUNDError: [egg-core] load file: C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\albumInfo.js, error: Cannot find module '../utils/secret' [egg-scripts] Require stack: [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\BaseService.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\albumInfo.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\lib\utils\index.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\lib\egg.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\index.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg\lib\application.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg\index.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-cluster\lib\app_worker.js [egg-scripts] Require stack: [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\BaseService.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\albumInfo.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\lib\utils\index.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\lib\egg.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\index.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg\lib\application.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg\index.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-cluster\lib\app_worker.js [egg-scripts] at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) [egg-scripts] at Function.Module._load (node:internal/modules/cjs/loader:778:27) [egg-scripts] at Module.require (node:internal/modules/cjs/loader:1005:19) [egg-scripts] at require (node:internal/modules/cjs/helpers:102:18) [egg-scripts] at Object. (C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\BaseService.ts:4:1) [egg-scripts] at Module._compile (node:internal/modules/cjs/loader:1103:14) [egg-scripts] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10) [egg-scripts] at Module.load (node:internal/modules/cjs/loader:981:32) [egg-scripts] at Function.Module._load (node:internal/modules/cjs/loader:822:12) [egg-scripts] at Module.require (node:internal/modules/cjs/loader:1005:19) [egg-scripts] code: "MODULE_NOT_FOUND" [egg-scripts] requireStack: ["C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\BaseService.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\albumInfo.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\lib\utils\index.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\lib\egg.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\index.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg\lib\application.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg\index.js","C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-cluster\lib\app_worker.js"] [egg-scripts] name: "MODULE_NOT_FOUNDError" [egg-scripts] pid: 18180 [egg-scripts] hostname: DESKTOP-2FLB9GC [egg-scripts] [egg-scripts] MODULE_NOT_FOUNDError: [egg-core] load file: C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\albumInfo.js, error: Cannot find module '../utils/secret' [egg-scripts] Require stack: [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\BaseService.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\albumInfo.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\lib\utils\index.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\lib\egg.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-core\index.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg\lib\application.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg\index.js [egg-scripts] - C:\Users\a\Desktop\test\kuwoMusicApi-master\node_modules\egg-cluster\lib\app_worker.js [egg-scripts] at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) [egg-scripts] at Function.Module._load (node:internal/modules/cjs/loader:778:27) [egg-scripts] at Module.require (node:internal/modules/cjs/loader:1005:19) [egg-scripts] at require (node:internal/modules/cjs/helpers:102:18) [egg-scripts] at Object. (C:\Users\a\Desktop\test\kuwoMusicApi-master\app\service\BaseService.ts:4:1) [egg-scripts] at Module._compile (node:internal/modules/cjs/loader:1103:14) [egg-scripts] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10) [egg-scripts] at Module.load (node:internal/modules/cjs/loader:981:32) [egg-scripts] at Function.Module._load (node:internal/modules/cjs/loader:822:12) [egg-scripts] at Module.require (node:internal/modules/cjs/loader:1005:19) [egg-scripts] [egg-scripts] Start got error, see C:\Users\a\logs\master-stderr.log [egg-scripts] Or use --ignore-stderr to ignore stderr at startup. ` 以下错误

super963883929 avatar Jul 22 '23 07:07 super963883929

请问这是什么原因?以前的旧版本是没有问题的

super963883929 avatar Jul 22 '23 07:07 super963883929

image 这东西好像都没有

super963883929 avatar Jul 22 '23 07:07 super963883929

你的设备是mac 还是win呀 ,我的win,没有这个问题

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: super963883929 @.> 发送时间: 2023年7月22日 15:52 收件人: QiuYaohong/kuwoMusicApi @.> 抄送: qyhqiu @.>, Comment @.> 主题: Re: [QiuYaohong/kuwoMusicApi] 关于日志文件无法自动删除问题 (Issue #16)

这东西好像都没有

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

qyhqiu avatar Jul 22 '23 07:07 qyhqiu

是找不到文件嘛,你可以单独copy出来到这个文件里面试下

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: super963883929 @.> 发送时间: 2023年7月22日 15:52 收件人: QiuYaohong/kuwoMusicApi @.> 抄送: qyhqiu @.>, Comment @.> 主题: Re: [QiuYaohong/kuwoMusicApi] 关于日志文件无法自动删除问题 (Issue #16)

这东西好像都没有

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

qyhqiu avatar Jul 22 '23 07:07 qyhqiu

win,能否加下你的QQ或者微信呢?方便联系

super963883929 avatar Jul 22 '23 07:07 super963883929

image我看你这github和git clone 下来的代码上面也没有上传"utils/secret",应该就是这里的问题所在了吗

super963883929 avatar Jul 22 '23 08:07 super963883929

我靠 应该是的 等我晚点回去看看

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: super963883929 @.> 发送时间: 2023年7月22日 16:20 收件人: QiuYaohong/kuwoMusicApi @.> 抄送: qyhqiu @.>, Comment @.> 主题: Re: [QiuYaohong/kuwoMusicApi] 关于日志文件无法自动删除问题 (Issue #16)

我看你这github和git clone 下来的代码上面也没有上传"utils/secret",应该就是这里的问题所在了吗

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

qyhqiu avatar Jul 22 '23 08:07 qyhqiu

嗯好,辛苦了

super963883929 avatar Jul 22 '23 08:07 super963883929

image我看你这github和git clone 下来的代码上面也没有上传"utils/secret",应该就是这里的问题所在了吗

文件提交了, 拉下代码 重新 npm run dev 跑起来看看

qyhqiu avatar Jul 22 '23 13:07 qyhqiu

大佬,播放付费接口怎么弄 image

13627491210 avatar Jul 23 '23 12:07 13627491210

大佬,播放付费接口怎么弄 image

付费音乐 祭了, 不知道怎么弄

qyhqiu avatar Jul 27 '23 12:07 qyhqiu

可能得去破解APP咯

super963883929 avatar Jul 28 '23 01:07 super963883929

又改了了,又非法请求了,这kuwo怎么天天改的??

super963883929 avatar Aug 08 '23 01:08 super963883929

大佬,播放付费接口怎么弄 image

付费音乐 祭了, 不知道怎么弄

【这是文件点击下载】zy-kuwo.zip

参考 #19

1.先运行 nodejs

npm install

npm run dev

2.运行python

(1)直接运行

pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

python MainServer.py

(2)docker运行

docker build -t kuwopy .

docker build -t kuwopy .

docker run -p 8899:8899 -it kuwopy

UPman24 avatar Aug 09 '23 08:08 UPman24

@QiuYaohong 但是遇到新问题,酷我头好像更新了,原先的又没用了

UPman24 avatar Aug 09 '23 08:08 UPman24

这几天又在频繁更新,有时一天改多少次

AffectionParadise avatar Aug 09 '23 12:08 AffectionParadise