1
0
Fork 0
mirror of synced 2024-06-14 16:35:02 +12:00

Fixing similar issue in queries for context handling and fixing some issues raised by IDE.

This commit is contained in:
mike12345567 2022-05-03 16:04:59 +01:00
parent d666ad3126
commit ec0854d0de
2 changed files with 9 additions and 10 deletions

View file

@ -100,10 +100,10 @@ class Orchestrator {
let automation = this._automation
const app = await this.getApp()
let stopped = false
let loopStep
let loopStep = null
let stepCount = 0
let loopStepNumber
let loopStepNumber = null
let loopSteps = []
for (let step of automation.definition.steps) {
stepCount++

View file

@ -191,14 +191,13 @@ class QueryRunner {
}
module.exports = (input, callback) => {
doInAppContext(input.appId, () => {
doInAppContext(input.appId, async () => {
const Runner = new QueryRunner(input)
Runner.execute()
.then(response => {
callback(null, response)
})
.catch(err => {
callback(err)
})
try {
const response = await Runner.execute()
callback(null, response)
} catch (err) {
callback(err)
}
})
}