4 ms·
You should never do blind retries in an infinite for loop, ideally it should be a generic retry function ( bounded ) that type check the error.
by Thaxll 2y ago
You should never do blind retries in an infinite for loop, ideally it should be a generic retry function ( bounded ) that type check the error.
- gwd 2y agoYes, that's exactly what the linked code does: Calls your function, and if it returns an error, check through the wrapped errors to see if it's one of the SQLite errors which should be retried. If it is, try the transaction again; if not, pass the error up.