-
Notifications
You must be signed in to change notification settings - Fork 280
DOC-5064 improvements to Jedis production usage advice #1400
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
Merged
+176
−4
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
665c463
DOC-5064 started checklist implementation
andy-stark-redis e0c14cb
DOC-5064 added checklist storage
andy-stark-redis b2f5c99
DOC-5064 finished checklist and added some new sections
andy-stark-redis 7490d77
DOC-5064 added health checks and TCP keepalive
andy-stark-redis 55dbd02
Apply suggestions from code review
andy-stark-redis 14d1400
DOC-5064 removed unused code and markup
andy-stark-redis 1a36cd4
Revert "DOC-5064 removed unused code and markup"
andy-stark-redis 0188a35
Merge branch 'DOC-5064-jedis-prod-usage' of github.com:redis/docs int…
andy-stark-redis bdf109c
DOC-5064 removed unused stuff
andy-stark-redis 3636c56
DOC-5064 removed incorrect tcpKeepAlive section
andy-stark-redis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <li> | ||
| <select onchange="clChange('prodlist')"> | ||
| <option value="R">❌</option> | ||
| <option value="G">✅</option> | ||
| <option value="A">🔍</option> | ||
| <option value="X">∅</option> | ||
| </select> | ||
| {{- if index .Params 0 -}} | ||
| <a href="{{ index .Params 0 }}">{{ .Inner }}</a> | ||
| {{- else -}} | ||
| {{ .Inner }} | ||
| {{- end -}} | ||
| </li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| {{ $formId := index .Params 0 }} | ||
| <form id="{{ $formId }}"> | ||
| <ul style="list-style-type: none;padding-left: 0px;"> | ||
| {{ .Inner }} | ||
| </ul> | ||
| <label for="gcount">✅ = </label> | ||
| <output name="gcount" id="gcount">0</output>/<output name="gtotal"></output>, | ||
| <label for="rcount">❌ = </label> | ||
| <output name="rcount" id="rcount">0</output>/<output name="rtotal"></output>, | ||
| <label for="acount">🔍 = </label> | ||
| <output name="acount" id="acount">0</output>/<output name="atotal"></output> | ||
| <br/> | ||
| (<label for="xcount">∅ = </label> | ||
| <output name="xcount" id="xcount">0</output>/<output name="xtotal"></output>) | ||
| </form> | ||
| <script> | ||
| document.addEventListener('DOMContentLoaded', () => { | ||
| let itemString = localStorage.getItem("{{ $formId }}"); | ||
|
|
||
| if (itemString !== "") { | ||
| setCLItemsFromString("{{ $formId }}", itemString); | ||
| } else { | ||
| clChange("{{ $formId }}"); | ||
| } | ||
| }); | ||
|
|
||
|
|
||
| function getStringFromCLItems(formId) { | ||
| let result = ""; | ||
|
|
||
| let form = document.getElementById(formId); | ||
|
|
||
| let listItems = form.getElementsByTagName("li"); | ||
|
|
||
| for (let elem of listItems) { | ||
| let menu = elem.getElementsByTagName("select")[0]; | ||
| result += menu.value; | ||
| } | ||
|
|
||
| return result; | ||
| } | ||
|
|
||
|
|
||
| function setCLItemsFromString(formId, clString) { | ||
| let counts = {R: 0, G: 0, A: 0, X:0}; | ||
|
|
||
| let form = document.getElementById(formId); | ||
| let listItems = form.getElementsByTagName("li"); | ||
|
|
||
| if (clString.length < listItems.length) { | ||
| clString = clString.padEnd(listItems.length, "R"); | ||
| } else if (clString.length > listItems.length) { | ||
| clString = clString.substring(0, listItems.length); | ||
| } | ||
|
|
||
| for (let i = 0; i < clString.length; i++) { | ||
| let char = clString.charAt(i); | ||
| counts[char]++; | ||
| let menu = listItems[i].getElementsByTagName("select")[0]; | ||
| menu.value = char; | ||
| } | ||
|
|
||
| form.elements["rcount"].value = counts["R"]; | ||
| form.elements["gcount"].value = counts["G"]; | ||
| form.elements["acount"].value = counts["A"]; | ||
| form.elements["xcount"].value = counts["X"]; | ||
|
|
||
|
|
||
| let numClItems = listItems.length - counts["X"]; | ||
|
|
||
| form.elements["rtotal"].value = numClItems; | ||
| form.elements["gtotal"].value = numClItems; | ||
| form.elements["atotal"].value = numClItems; | ||
| form.elements["xtotal"].value = counts["X"]; | ||
|
|
||
| let itemChoices = getStringFromCLItems("{{ $formId }}"); | ||
| localStorage.setItem("{{ $formId }}", itemChoices); | ||
| } | ||
|
|
||
|
|
||
| function clChange(formId) { | ||
| let itemChoices = getStringFromCLItems(formId); | ||
| setCLItemsFromString(formId, itemChoices); | ||
| } | ||
| </script> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
tcpKeepAliveis by default through when usingDefaultJedisSocketFactoryand is not externally configurable.DefaultJedisClientConfigdoes not exposetcpKeepAlive(true)methodThere 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.
@ggivo Fixed.