We are having an occasional issue whereby queries and deliveries get stuck. They are permanently flashing blue and as they are not failing we do not get an error alert. The 'stuck' delivery uses a recurring delivery. I believe this is getting stuck due to network errors, as shown in logs below.
We have a script that automatically restarts a workflow when it fails (below). However, is there any way to adapt the below to target 'stuck' workflows? If due to network error, then perhaps a timer on a delivery would be a solution?