I have a rule that is triggered by multiple events. Within the actions of the rule, I have a repeat loop. With the new Scheduled Jobs logging feature, I have discovered that this rule always has two repeat loops executing. It should only have one. I believe it is getting triggered twice by two different events at the same time and thus, creating two repeat loops.
Is there a way I can single thread and/or synchronize this action to ensure only one repeat loop is created? I originally had a rule variable to designate whether it was repeating and I checked it before going into the repeat section, but that did not solve it. I believe it did not solve it because they were running in parallel and I had a race condition that the variable had the same value at the same time between the two triggered thread executions.
I am wondering if the new Wait action can be useful here, but struggling to think how to use it for this situation.