mirror of
https://github.com/AsgardEternal/SquadJSDocker.git
synced 2025-01-04 18:59:29 -06:00
Update db-log-addOn.js
This commit is contained in:
parent
fe5a9c0670
commit
3ec6c523dd
@ -93,12 +93,15 @@ export default class DBLogPlayerTime extends DBLog {
|
|||||||
console.log('starting DB repair');
|
console.log('starting DB repair');
|
||||||
await super.repairDB();
|
await super.repairDB();
|
||||||
console.log('starting DB repair for addOn');
|
console.log('starting DB repair for addOn');
|
||||||
let lastTickTime = await this.models.TickRate.findOne(
|
let lastTickTime = await this.models.TickRate.findOne({
|
||||||
{ where: { server: this.options.overrideServerID || this.server.id},
|
where: { server: this.options.overrideServerID || this.server.id},
|
||||||
order: [['id', 'DESC']]}
|
order: [['id', 'DESC']],
|
||||||
|
logging: console.log
|
||||||
|
}
|
||||||
);
|
);
|
||||||
console.log('last tick found:', lastTickTime);
|
console.log('last tick found:', lastTickTime);
|
||||||
let lastServerTime = String(lastTickTime.time);
|
let lastServerDate = lastTickTime.time;
|
||||||
|
let lastServerTime = lastServerDate.getFullYear() + '-' + (lastServerDate.getMonth() + 1) + '-' + lastServerDate.getDate()+' '+lastServerDate.getHours()+':'+lastServerDate.getMinutes()+':'+lastServerDate.getSeconds();
|
||||||
console.log('last time found:', lastServerTime);
|
console.log('last time found:', lastServerTime);
|
||||||
let playerOnlineID = [];
|
let playerOnlineID = [];
|
||||||
playerOnlineID.push(0);
|
playerOnlineID.push(0);
|
||||||
@ -111,7 +114,7 @@ export default class DBLogPlayerTime extends DBLog {
|
|||||||
{ leaveTime: (lastServerTime) },
|
{ leaveTime: (lastServerTime) },
|
||||||
{ where: {
|
{ where: {
|
||||||
leaveTime: {[is]: null},
|
leaveTime: {[is]: null},
|
||||||
server: (this.options.overrideServerID || this.server.id),
|
server: this.options.overrideServerID || this.server.id,
|
||||||
player: {[notIn]: playerOnlineID}
|
player: {[notIn]: playerOnlineID}
|
||||||
},
|
},
|
||||||
logging: console.log
|
logging: console.log
|
||||||
|
Loading…
Reference in New Issue
Block a user