Closed andynu closed 1 month ago
Add allow_retry kwarg to execute
This extends the existing class level auto_retry functionality to optionally allow an allow_retry boolean kwarg to allow retry of specific queries.
This PR preserves the requirement that autocommit? be enabled, which is the safer choice.
autocommit?
def with_retry(allow_retry: false) # :nodoc: should_retry = (allow_retry || self.class.auto_retry?) && autocommit?
See issue #2310
Stacked on #2372
Add allow_retry kwarg to execute
This extends the existing class level auto_retry functionality to optionally allow an allow_retry boolean kwarg to allow retry of specific queries.
This PR preserves the requirement that
autocommit?
be enabled, which is the safer choice.See issue #2310
Stacked on #2372