Skip to content

Commit 21437cb

Browse files
fix: do not run teardown if executor's run failed
1 parent 6e55caf commit 21437cb

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/executor/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub async fn run_executor(
114114
None
115115
};
116116

117-
let run_result = executor.run(execution_context, &mongo_tracer).await;
117+
executor.run(execution_context, &mongo_tracer).await?;
118118

119119
// TODO: refactor and move directly in the Instruments struct as a `stop` method
120120
if let Some(mut mongo_tracer) = mongo_tracer {
@@ -123,9 +123,6 @@ pub async fn run_executor(
123123
debug!("Tearing down the executor");
124124
executor.teardown(execution_context).await?;
125125

126-
// Propagate any run error after cleanup
127-
run_result?;
128-
129126
orchestrator
130127
.logger
131128
.persist_log_to_profile_folder(&execution_context.profile_folder)?;

0 commit comments

Comments
 (0)