Fix for automation issue, doInAppContext for automation thread wasn't async, was immediately closing the database, rather than waiting for the operations to complete.
This commit is contained in:
parent
2a01bd5210
commit
c66cbcd522
|
@ -286,18 +286,16 @@ class Orchestrator {
|
||||||
|
|
||||||
module.exports = (input, callback) => {
|
module.exports = (input, callback) => {
|
||||||
const appId = input.data.event.appId
|
const appId = input.data.event.appId
|
||||||
doInAppContext(appId, () => {
|
doInAppContext(appId, async () => {
|
||||||
const automationOrchestrator = new Orchestrator(
|
const automationOrchestrator = new Orchestrator(
|
||||||
input.data.automation,
|
input.data.automation,
|
||||||
input.data.event
|
input.data.event
|
||||||
)
|
)
|
||||||
automationOrchestrator
|
try {
|
||||||
.execute()
|
const response = await automationOrchestrator.execute()
|
||||||
.then(response => {
|
callback(null, response)
|
||||||
callback(null, response)
|
} catch (err) {
|
||||||
})
|
callback(err)
|
||||||
.catch(err => {
|
}
|
||||||
callback(err)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1014,10 +1014,10 @@
|
||||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
"@budibase/backend-core@1.0.131":
|
"@budibase/backend-core@1.0.135":
|
||||||
version "1.0.131"
|
version "1.0.135"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.131.tgz#4b284405e19a345de1af723d0c1e3fa315463140"
|
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.135.tgz#b8cf217243b285c6e74435acba7c8960a1651c23"
|
||||||
integrity sha512-1r6JjIcSBHogGm2YLB7k712+3LLE1+42C3eITa6n8r/QQIkyK7DJwm0I403IRKeh/93gwgQtBiRpJfhy2p7Pew==
|
integrity sha512-7gnTW6w8upJSPNqdyt5gpkubf0glDyTiSszLVVRZdxJypYAnBjcVrSFvlNPDzI4X2glnNnGcXBxFdDg6Z9ZS5w==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@techpass/passport-openidconnect" "^0.3.0"
|
"@techpass/passport-openidconnect" "^0.3.0"
|
||||||
aws-sdk "^2.901.0"
|
aws-sdk "^2.901.0"
|
||||||
|
@ -1091,12 +1091,12 @@
|
||||||
svelte-flatpickr "^3.2.3"
|
svelte-flatpickr "^3.2.3"
|
||||||
svelte-portal "^1.0.0"
|
svelte-portal "^1.0.0"
|
||||||
|
|
||||||
"@budibase/pro@1.0.131":
|
"@budibase/pro@1.0.135":
|
||||||
version "1.0.131"
|
version "1.0.135"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.131.tgz#65907e7ca528d237bf12dbe5c159156d03e8d5c3"
|
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.135.tgz#fa4f3b2a8e14905c97305a79e4b91d1094dba1a0"
|
||||||
integrity sha512-pmK18/1TPDY+3IHUzGh0fG5CEy7+kSPpcl72smri8jvo5OsD4lWQVOTHSdqRn8aIf/qEHHWc2sspEEDGhYMv0Q==
|
integrity sha512-XfZTfrplyY03zuTE3dPzdJvVD3qO5ShbRUYNX/05VBubwhS7S0mczwfCTJPi8agfx3LGN4yQd7GhFbaN2zrOPg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/backend-core" "1.0.131"
|
"@budibase/backend-core" "1.0.135"
|
||||||
node-fetch "^2.6.1"
|
node-fetch "^2.6.1"
|
||||||
|
|
||||||
"@budibase/standard-components@^0.9.139":
|
"@budibase/standard-components@^0.9.139":
|
||||||
|
|
|
@ -293,10 +293,10 @@
|
||||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
"@budibase/backend-core@1.0.131":
|
"@budibase/backend-core@1.0.135":
|
||||||
version "1.0.131"
|
version "1.0.135"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.131.tgz#4b284405e19a345de1af723d0c1e3fa315463140"
|
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.135.tgz#b8cf217243b285c6e74435acba7c8960a1651c23"
|
||||||
integrity sha512-1r6JjIcSBHogGm2YLB7k712+3LLE1+42C3eITa6n8r/QQIkyK7DJwm0I403IRKeh/93gwgQtBiRpJfhy2p7Pew==
|
integrity sha512-7gnTW6w8upJSPNqdyt5gpkubf0glDyTiSszLVVRZdxJypYAnBjcVrSFvlNPDzI4X2glnNnGcXBxFdDg6Z9ZS5w==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@techpass/passport-openidconnect" "^0.3.0"
|
"@techpass/passport-openidconnect" "^0.3.0"
|
||||||
aws-sdk "^2.901.0"
|
aws-sdk "^2.901.0"
|
||||||
|
@ -321,12 +321,12 @@
|
||||||
uuid "^8.3.2"
|
uuid "^8.3.2"
|
||||||
zlib "^1.0.5"
|
zlib "^1.0.5"
|
||||||
|
|
||||||
"@budibase/pro@1.0.131":
|
"@budibase/pro@1.0.135":
|
||||||
version "1.0.131"
|
version "1.0.135"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.131.tgz#65907e7ca528d237bf12dbe5c159156d03e8d5c3"
|
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.135.tgz#fa4f3b2a8e14905c97305a79e4b91d1094dba1a0"
|
||||||
integrity sha512-pmK18/1TPDY+3IHUzGh0fG5CEy7+kSPpcl72smri8jvo5OsD4lWQVOTHSdqRn8aIf/qEHHWc2sspEEDGhYMv0Q==
|
integrity sha512-XfZTfrplyY03zuTE3dPzdJvVD3qO5ShbRUYNX/05VBubwhS7S0mczwfCTJPi8agfx3LGN4yQd7GhFbaN2zrOPg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/backend-core" "1.0.131"
|
"@budibase/backend-core" "1.0.135"
|
||||||
node-fetch "^2.6.1"
|
node-fetch "^2.6.1"
|
||||||
|
|
||||||
"@cspotcode/source-map-consumer@0.8.0":
|
"@cspotcode/source-map-consumer@0.8.0":
|
||||||
|
|
Loading…
Reference in New Issue