Skip to content

Commit

Permalink
Stopped using effect.bracket during execution since this sometimes st…
Browse files Browse the repository at this point in the history
…ops mid execution.
  • Loading branch information
Tim Linschoten committed Nov 24, 2024
1 parent d3307bc commit 943a6e2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,11 @@ private[recipeinstance] case class TransitionExecution(
interactionStarted <- effect.delay(InteractionStarted(startTime, recipe.name, recipe.recipeId, recipeInstanceId, interactionTransition.interactionName))
_ <- effect.delay(components.logging.interactionStarted(interactionStarted))
_ <- components.eventStream.publish(interactionStarted)

interactionOutput <- effect.bracket(setupMdc)(_ => execute)(_ => cleanMdc)
interactionOutput <-
setupMdc.map(_ => execute).flatMap(x => {
cleanMdc
x
})
_ <- validateInteractionOutput(interactionTransition, interactionOutput)
transformedOutput: Option[EventInstance] = interactionOutput.map(_.transformWith(interactionTransition))

Expand Down

0 comments on commit 943a6e2

Please sign in to comment.