You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it safe / recommended to re-use Retry Providers? We have a multi-tenant web application and currently EVERY call is calling this method AND re-creating the event handler. Is there a better way to do this?
Note: we are re-using the SqlRetryLogicOption via a static readonly singleton.
// Create a retry provider for each new request - This might be thread safe, but all examples show not caching it
var provider = SqlConfigurableRetryFactory.CreateExponentialRetryProvider(_sqlRetryOptions);
// define the retrying event to report execution attempts
provider.Retrying += (object s, SqlRetryingEventArgs e) => { // stuff }
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is it safe / recommended to re-use Retry Providers? We have a multi-tenant web application and currently EVERY call is calling this method AND re-creating the event handler. Is there a better way to do this?
Note: we are re-using the SqlRetryLogicOption via a static readonly singleton.
Beta Was this translation helpful? Give feedback.
All reactions