Fixing similar issue in queries for context handling and fixing some issues raised by IDE.
This commit is contained in:
parent
c66cbcd522
commit
9386a82e6f
|
@ -100,10 +100,10 @@ class Orchestrator {
|
||||||
let automation = this._automation
|
let automation = this._automation
|
||||||
const app = await this.getApp()
|
const app = await this.getApp()
|
||||||
let stopped = false
|
let stopped = false
|
||||||
let loopStep
|
let loopStep = null
|
||||||
|
|
||||||
let stepCount = 0
|
let stepCount = 0
|
||||||
let loopStepNumber
|
let loopStepNumber = null
|
||||||
let loopSteps = []
|
let loopSteps = []
|
||||||
for (let step of automation.definition.steps) {
|
for (let step of automation.definition.steps) {
|
||||||
stepCount++
|
stepCount++
|
||||||
|
|
|
@ -191,14 +191,13 @@ class QueryRunner {
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = (input, callback) => {
|
module.exports = (input, callback) => {
|
||||||
doInAppContext(input.appId, () => {
|
doInAppContext(input.appId, async () => {
|
||||||
const Runner = new QueryRunner(input)
|
const Runner = new QueryRunner(input)
|
||||||
Runner.execute()
|
try {
|
||||||
.then(response => {
|
const response = await Runner.execute()
|
||||||
callback(null, response)
|
callback(null, response)
|
||||||
})
|
} catch (err) {
|
||||||
.catch(err => {
|
callback(err)
|
||||||
callback(err)
|
}
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue