1
0
Fork 0
mirror of synced 2024-08-09 15:17:57 +12:00

Merge pull request #5267 from Budibase/fix/bash-step-timeout

configure bash step to use automation query timeout
This commit is contained in:
Martin McKeaveney 2022-04-06 11:26:20 +01:00 committed by GitHub
commit 89131fd7d9

View file

@ -1,6 +1,7 @@
const { execSync } = require("child_process")
const { processStringSync } = require("@budibase/string-templates")
const automationUtils = require("../automationUtils")
const environment = require("../../environment")
exports.definition = {
name: "Bash Scripting",
@ -51,7 +52,9 @@ exports.run = async function ({ inputs, context }) {
let stdout,
success = true
try {
stdout = execSync(command, { timeout: 500 }).toString()
stdout = execSync(command, {
timeout: environment.QUERY_THREAD_TIMEOUT || 500,
}).toString()
} catch (err) {
stdout = err.message
success = false