mirror of
https://github.com/AsgardEternal/SquadJSDocker.git
synced 2025-01-02 12:09:20 -06:00
Update db-log-addOn.js
This commit is contained in:
parent
dfdd5f4286
commit
fa06490818
@ -110,14 +110,18 @@ export default class DBLogPlayerTime extends DBLog {
|
|||||||
}
|
}
|
||||||
console.log('players online:', playerOnlineID);
|
console.log('players online:', playerOnlineID);
|
||||||
const {ne, not, notIn, is} = Sequelize.Op;
|
const {ne, not, notIn, is} = Sequelize.Op;
|
||||||
|
let updateVals = { leaveTime: lastServerTime };
|
||||||
|
let whereStuff = {
|
||||||
|
leaveTime: {[is]: null},
|
||||||
|
server: this.options.overrideServerID || this.server.id,
|
||||||
|
player: {[notIn]: playerOnlineID}
|
||||||
|
};
|
||||||
|
console.log(updateVals);
|
||||||
|
console.log(whereStuff);
|
||||||
let rowUpdate = await this.models.PlayerTime.update(
|
let rowUpdate = await this.models.PlayerTime.update(
|
||||||
{ leaveTime: lastServerTime },
|
updateVals, {
|
||||||
{ where: {
|
where: whereStuff,
|
||||||
leaveTime: {[is]: null},
|
logging: console.log
|
||||||
server: this.options.overrideServerID || this.server.id,
|
|
||||||
player: {[notIn]: playerOnlineID}
|
|
||||||
},
|
|
||||||
logging: console.log
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
console.log('updated playerTimes row count: %i', rowUpdate[0]);
|
console.log('updated playerTimes row count: %i', rowUpdate[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user