Comments (1)
From my point of view if makes more sense to have it overwrite the context definition. Making it additive would make it harder to replace the exception and possibily break some code that relies on it being replaced.
A workaround here could be sharing that list in a constant for example:
MYSQL_RETRIES = [Mysql::DeadlockException]
Retriable.configure do |c|
c.contexts[:mysql] = {
tries: 10,
multiplier: 2.5,
on: MYSQL_RETRIES
}
end
And reuse it:
Retriable.with_context(:mysql, on: [MYSQL_RETRIES*, SomeOtherException]) do
# …
end
from retriable.
Related Issues (20)
- Dependabot can't resolve your Ruby dependency files
- Dependabot can't resolve your Ruby dependency files
- Question: Short Circuiting Retriable While Testing Your App HOT 1
- Testing setup HOT 5
- Error message on max_elapsed_time HOT 2
- rubinius travis failures seem to be due to srand(0) not seeding random the same way HOT 1
- the rubygems summary still has really bad grammar HOT 1
- Have a parameter to supply a proc that is only called on the final failure
- Travis Build fails when installing rubygems-update
- Callback if max elapsed time has been reached
- Using RUBY_VERSION in a gemspec doesn't work HOT 2
- Feature request: allow `with_context` without context configuration HOT 3
- Replace houndci HOT 3
- sleep_disabled option not documented HOT 2
- cannot load such file -- retriable HOT 1
- Retriable only trying for 20 times even though my tries is 360. Not sure why that's happpening. HOT 3
- Request: Remove Gemfile.lock from .gitignore HOT 8
- Timeout::timeout is inherently unsafe HOT 2
- CI: bundler 1.17.3 seems not to work w/ ruby-head
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from retriable.