Newskooler
10/21/2020, 3:13 PMopen_db_connection
(run only once during a flow)
• save_to_db
run multiple times during one flow
• close_db_connection
- run once at the end of the flow
Sometimes when I save_to_db
the connection has dropped out (for various reasons). Would a clean solution be to set the current save_to_db
task as RETRY
and then set one of the tasks it depends on (the open_db_connection
task) as RETRY too.
This way it will (or so I expect) to open a db connection first and then retry the failed task again.
🤔 is my thinking correct and is that possible or it’s a messy solution?
Thanks : )Spencer
10/21/2020, 3:25 PMsave_to_db
task. It'll make a connection, save the data, then close the connection. I think it can be a bit dicey to try to manage shared resources outside the flow tasks and share them across tasks rather than having each task isolated.Newskooler
10/21/2020, 3:27 PMJeremiah
Newskooler
10/21/2020, 3:40 PM