1
0
Fork 0
mirror of synced 2024-06-10 22:44:51 +12:00

Merge pull request #5175 from Budibase/automation-logging

Add additional logging to automations
This commit is contained in:
Rory Powell 2022-03-30 15:23:24 +01:00 committed by GitHub
commit ddeae17587
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,10 +17,14 @@ const Runner = new Thread(ThreadType.AUTOMATION)
exports.processEvent = async job => {
try {
// need to actually await these so that an error can be captured properly
console.log(
`${job.data.automation.appId} automation ${job.data.automation._id} running`
)
return await Runner.run(job)
} catch (err) {
const errJson = JSON.stringify(err)
console.error(
`${job.data.automation.appId} automation ${job.data.automation._id} was unable to run - ${err}`
`${job.data.automation.appId} automation ${job.data.automation._id} was unable to run - ${errJson}`
)
console.trace(err)
return { err }