Merge branch 'next' into develop

This commit is contained in:
nocobase[bot] 2024-12-12 05:41:53 +00:00
commit b2895e6d62

View File

@ -613,7 +613,7 @@ export default class PluginWorkflowServer extends Plugin {
await (job ? processor.resume(job) : processor.start()); await (job ? processor.resume(job) : processor.start());
logger.info(`execution (${execution.id}) finished with status: ${execution.status}`, { execution }); logger.info(`execution (${execution.id}) finished with status: ${execution.status}`, { execution });
if (execution.status && execution.workflow.options?.deleteExecutionOnStatus?.includes(execution.status)) { if (execution.status && execution.workflow.options?.deleteExecutionOnStatus?.includes(execution.status)) {
await execution.destroy(); await execution.destroy({ transaction: processor.mainTransaction });
} }
} catch (err) { } catch (err) {
logger.error(`execution (${execution.id}) error: ${err.message}`, err); logger.error(`execution (${execution.id}) error: ${err.message}`, err);