Skip to content

Clarity on code executed outside of steps #586

Closed Answered by tonyhb
michaelhays asked this question in Q&A
Discussion options

You must be logged in to vote

It runs many times. Steps run once and the first run's output is stored in function state and injected on the next run.

Code outside of steps is ran multiple times up until we execute the next step. For example, if this await was at the end of the function it only runs once, as it's not executed until all steps finish. However, being at the top it's ran every time a step is invoked.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@michaelhays
Comment options

@ShravanSunder
Comment options

Answer selected by tonyhb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants