v2 ia9gaugfi

This commit is contained in:
2018-12-17 18:43:22 +01:00
parent a6ffa303a2
commit f7886678c4
3 changed files with 38 additions and 28 deletions

View File

@@ -1091,24 +1091,29 @@ class AutomaticDispose {
const runnerIframe = self.ADisSettings.runner_iframes[runnerID];
const runnerSettings = self.ADisSettings.runner_settings[runnerID];
console.table({
Runner: Runner,
runnerID: runnerID,
runnerSettings: runnerSettings,
runnerIframeName: runnerIframeName,
runnerIframe:runnerIframe
})
// console.table({
// Runner: Runner,
// runnerID: runnerID,
// runnerSettings: runnerSettings,
// runnerIframeName: runnerIframeName,
// runnerIframe: runnerIframe
// })
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions, self.ADisDB.ADisAvailabelMissions], () => {
self.ADSettings().then((setting) => {
if (setting[runnerSettings] == 'true') {
return self.ADisDB.ADisMissions.where({
let coll = self.ADisDB.ADisMissions.where({
runner: Runner,
available: 'true',
done: 'false'
}).and(function (item) {
return item.next_check <= Math.floor(new Date().getTime() / 1000)
}).toArray()
})
if (self.MyRunner != "kt") {
coll = coll.and(function (item) {
return item.next_check <= Math.floor(new Date().getTime() / 1000)
});
}
return coll.toArray()
}
}).then((Wunsche) => {
if (typeof Wunsche === "undefined") {
@@ -1119,8 +1124,8 @@ class AutomaticDispose {
});
//console.log("TIME:", Math.floor(new Date().getTime() / 1000))
if (Runner == 'kt') {
console.table(Wunsche);
}
console.table(Wunsche);
}
if (Wunsche.length > 0) {
let myWunsch = Wunsche[0];
// console.log("MYWUNSCH:")