fix: updateInTime refs #6276
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
7d0c11e937
commit
e354de4ff5
|
@ -42,7 +42,7 @@ module.exports = Self => {
|
||||||
const machineWorker = await models.MachineWorker.findOne({
|
const machineWorker = await models.MachineWorker.findOne({
|
||||||
where: {
|
where: {
|
||||||
workerFk: userId,
|
workerFk: userId,
|
||||||
inTime: {gte: new Date(Date.now() - maxHours * 60 * 60 * 1000)},
|
inTime: {gte: Date.vnNew() - (maxHours * 60 * 60 * 1000)},
|
||||||
outTimed: null,
|
outTimed: null,
|
||||||
machineFk: machine.id,
|
machineFk: machine.id,
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
if (machineWorker) {
|
if (machineWorker) {
|
||||||
await machineWorker.updateAttributes({
|
await machineWorker.updateAttributes({
|
||||||
outTime: new Date(Date.now())
|
outTime: Date.now()
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue