v2 iaofhaoifaoj
This commit is contained in:
@@ -1022,12 +1022,10 @@ class AutomaticDispose {
|
||||
|
||||
RemoveMissionsFromQueue(MissionID) {
|
||||
const self = this;
|
||||
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => {
|
||||
return self.ADisDB.ADisMissions.where({
|
||||
missionID: MissionID
|
||||
}).delete().catch((err) => {
|
||||
console.error(err)
|
||||
})
|
||||
return self.ADisDB.ADisMissions.where({
|
||||
missionID: MissionID
|
||||
}).delete().catch((err) => {
|
||||
console.error(err)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1120,33 +1118,35 @@ class AutomaticDispose {
|
||||
console.log("Window", window.name);
|
||||
console.log("self.MyRunner", self.MyRunner);
|
||||
console.log("self.MyRunnerSettings", self.MyRunnerSettings);
|
||||
self.ADSettings().then((setting) => {
|
||||
if (setting[self.MyRunnerSettings] === 'true') {
|
||||
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => {
|
||||
self.ADSettings().then((setting) => {
|
||||
if (setting[self.MyRunnerSettings] === 'true') {
|
||||
|
||||
let where = {
|
||||
missionID: self.MissionID,
|
||||
runner: self.MyRunner,
|
||||
done: 'false'
|
||||
}
|
||||
console.log(where);
|
||||
return self.ADisDB.ADisMissions.where(where).limit(1)
|
||||
}
|
||||
}).then((Wunsch) => {
|
||||
if (Wunsch !== undefined) {
|
||||
return Wunsch.count(function (count) {
|
||||
if (count > 0) {
|
||||
return Wunsch.each((mywunsch) => {
|
||||
return self.MainHandler()
|
||||
});
|
||||
} else {
|
||||
self.RemoveMissionsFromQueue(self.MissionID)
|
||||
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
||||
let where = {
|
||||
missionID: self.MissionID,
|
||||
runner: self.MyRunner,
|
||||
done: 'false'
|
||||
}
|
||||
});
|
||||
} else {
|
||||
self.RemoveMissionsFromQueue(self.MissionID)
|
||||
return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
||||
}
|
||||
console.log(where);
|
||||
return self.ADisDB.ADisMissions.where(where).limit(1)
|
||||
}
|
||||
}).then((Wunsch) => {
|
||||
if (Wunsch !== undefined) {
|
||||
return Wunsch.count(function (count) {
|
||||
if (count > 0) {
|
||||
return Wunsch.each((mywunsch) => {
|
||||
return self.MainHandler()
|
||||
});
|
||||
} else {
|
||||
self.RemoveMissionsFromQueue(self.MissionID)
|
||||
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
self.RemoveMissionsFromQueue(self.MissionID)
|
||||
return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
||||
}
|
||||
})
|
||||
})
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user