bugfix for resolving a action class, handle errors and write to log

main
HerrHase 2 weeks ago
parent 4e926a28be
commit e438564177

@ -29,8 +29,15 @@ async function run(config: object) {
for (const actionConfig of config.actions) { for (const actionConfig of config.actions) {
let ActionClass
// resolve action class // resolve action class
const ActionClass = await import(resolveActionClass(actionConfig.class)) try {
ActionClass = await import(resolveActionClass(actionConfig.class))
} catch(error) {
logger(config.slug).error('runner / resolve action class / ' + error)
continue
}
// options are exists, add to docket // options are exists, add to docket
if (actionConfig.hasOwnProperty('options')) { if (actionConfig.hasOwnProperty('options')) {

Loading…
Cancel
Save