1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee

netease_music 修改表结构;代码调整

This commit is contained in:
2023-06-04 09:33:37 +08:00
parent 70e15f7e49
commit 4ab2725343
7 changed files with 394 additions and 7 deletions

View File

@@ -93,7 +93,8 @@ async function fetch({ songId }) {
// console.log(commentInfoList);
// console.log(userInfoList);
await dataManager.comment.insertCollection(commentInfoList.map(commentInfo => [
console.log("dataManager.comment.insertCollection & dataManager.user.insertCollection")
let p1 = dataManager.comment.insertCollection(commentInfoList.map(commentInfo => [
commentInfo.comment_id,
commentInfo.parent_comment_id,
commentInfo.user_id,
@@ -103,14 +104,13 @@ async function fetch({ songId }) {
commentInfo.like_count,
commentInfo.comment_type
]));
await dataManager.user.insertCollection(userInfoList.map(userInfo => [
let p2 = dataManager.user.insertCollection(userInfoList.map(userInfo => [
userInfo.user_id,
userInfo.user_type,
userInfo.nickname,
userInfo.avatar_url,
]));
await Promise.all([p1, p2])
// console.log("INSERT comment and user finished");
// console.log(commentResult.body.more, comments.length, commentInfoList.length);
@@ -145,9 +145,13 @@ async function fetch({ songId }) {
current_status: progress.currentStatus,
total: progress.total,
};
await dataManager.comment_progress.update(commentProgressInfo, songId);
console.log("dataManager.comment_progress.update")
let p3 = dataManager.comment_progress.update(commentProgressInfo, songId);
// console.log("UPDATE comment_progress");
await sleepUtils.sleep(global.sleepTime);
await p3
// console.log("sleepUtils.sleep")
// await sleepUtils.sleep(global.sleepTime);
}
}