Update db-log-addOn.js

This commit is contained in:
Skillet 2023-03-06 09:52:36 -05:00 committed by GitHub
parent e8c0607fe2
commit 53af31370d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,21 +102,21 @@ export default class DBLogPlayerTime extends DBLog {
console.log('last time found:', lastServerTime); console.log('last time found:', lastServerTime);
let playerOnlineID = []; let playerOnlineID = [];
playerOnlineID.push(0); playerOnlineID.push(0);
// for (const player of this.server.players){ for (const player of this.server.players){
// playerOnlineID.push(player.steamID); playerOnlineID.push(player.steamID);
// } }
console.log('players online:', playerOnlineID); console.log('players online:', playerOnlineID);
const {ne} = Sequelize.Op; // const {ne, not, in} = Sequelize.Op;
// let rowUpdate = await this.models.PlayerTime.update( let rowUpdate = await this.models.PlayerTime.update(
// { leaveTime: lastServerTime }, { leaveTime: lastServerTime },
// { where: { { where: {
// leaveTime: null, leaveTime: {[Op.not]: null},
// server: this.options.overrideServerID || this.server.id, server: this.options.overrideServerID || this.server.id,
// player: { [ne]: playerOnlineID } player: { [Op.ne]: {[Op.in]: playerOnlineID} }
// } }, } },
// { logging: console.log } { logging: console.log }
// ); );
// console.log('updated playerTimes row count: %i', rowUpdate[0]); console.log('updated playerTimes row count: %i', rowUpdate[0]);
console.log('finish DB repair'); console.log('finish DB repair');
} }