将user数据导入变更为串行,防止一些特殊情况下的userid冲突
This commit is contained in:
parent
86b2b7d60a
commit
83ba3482bd
|
@ -344,7 +344,7 @@ export default class User extends base {
|
||||||
await sequelize.query(`delete from UserGames where userId is null or data is null`, {})
|
await sequelize.query(`delete from UserGames where userId is null or data is null`, {})
|
||||||
let games = await UserGameDB.findAll()
|
let games = await UserGameDB.findAll()
|
||||||
let count = 0
|
let count = 0
|
||||||
await Data.asyncPool(20, games, async (game) => {
|
await Data.forEach(games, async (game) => {
|
||||||
if (!game.userId) {
|
if (!game.userId) {
|
||||||
game.destroy()
|
game.destroy()
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue