-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add 'Network error handling' section to documentation #2250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I think it'll fit better in the client-configuration.md file |
i didn't even notice there was more doc... lol I guess it isn't relevant anymore? |
@phpbg I think that we should merge your changes into that doc somehow.. :) |
ok, i'll move them to client-configuration.md |
@leibale It should be in better shape now ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small change to the text, approving.
docs/client-configuration.md
Outdated
You can implement a custom reconnect strategy as a function: | ||
When a network error occurs the client will automatically try to reconnect, following a default linear strategy (the more attempts, the more waiting before trying to reconnect). | ||
|
||
This strategy can be overriden by providing a `socket.reconnectStrategy` option during client's creation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- overridden
- during the client's creation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
docs/client-configuration.md
Outdated
import { createClient } from 'redis'; | ||
|
||
const client = createClient({ | ||
url: 'redis://alice:foobared@awesome.redis.server:6380', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to show url in this example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@phpbg sorry for the long dealy, I was on vacation.. |
Codecov ReportBase: 95.85% // Head: 95.85% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2250 +/- ##
========================================
Coverage 95.85% 95.85%
========================================
Files 433 451 +18
Lines 4001 4247 +246
Branches 451 475 +24
========================================
+ Hits 3835 4071 +236
- Misses 102 106 +4
- Partials 64 70 +6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Blocked by #2373 - will need some updates as this PR changes
@phpbg wanna make these changes or do you prefer I'll do it? |
Merging as is, will make the changes in #2373 |
* Add 'Network error handling' section to documentation * Merge 'Network error handling' section with existing doc * typo * Update README.md * typos Co-authored-by: Samuel CHEMLA <samuel.chemla@orange.com> Co-authored-by: Leibale Eidelman <me@leibale.com>
Description
Document network errors handling and reconnect strategy
Checklist
npm test
pass with this change (including linting)?