From fb34ec761488783a1a025a76e20674c9cac8139a Mon Sep 17 00:00:00 2001 From: Andres Garcia Date: Mon, 11 May 2026 17:22:16 -0300 Subject: [PATCH] Remove errors rescue from parallel workflow --- lib/mars/workflows/parallel.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/mars/workflows/parallel.rb b/lib/mars/workflows/parallel.rb index 1038b64..a356281 100644 --- a/lib/mars/workflows/parallel.rb +++ b/lib/mars/workflows/parallel.rb @@ -12,11 +12,8 @@ def initialize(name, steps:, aggregator: nil, **kwargs) def run(context) context = ensure_context(context) - errors = [] child_contexts = [] - results = execute_steps(context, errors, child_contexts) - - raise AggregateError, errors if errors.any? + results = execute_steps(context, child_contexts) context.merge(child_contexts) context.current_input = results @@ -27,7 +24,7 @@ def run(context) attr_reader :steps, :aggregator - def execute_steps(context, errors, child_contexts) + def execute_steps(context, child_contexts) Async do |workflow| tasks = steps.map do |step| child_ctx = context.fork(state: step.state) @@ -35,8 +32,6 @@ def execute_steps(context, errors, child_contexts) workflow.async do workflow_step(step, child_ctx) - rescue StandardError => e - errors << { error: e, step_name: step.name } end end