Browse Source

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

configure bash step to use automation query timeout
pull/5288/head
Martin McKeaveney 4 years ago
committed by GitHub
parent
commit
c5e94e1e9b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/server/src/automations/steps/bash.js

5
packages/server/src/automations/steps/bash.js

@ -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

Loading…
Cancel
Save