Purge old Rendered Templates #2167
Merged
Conversation
2 commits
Sep 25, 2017
added … used used_memory:7078922104 used_memory_human:6.59G used_memory_rss:7078863208 used_memory_rss_human:6.59G used_memory_peak:15792637592 used_memory_peak_human:14.71G used_memory_lua:37888 used_memory_lua_human:37.00K used_cpu_sys:261.25 used_cpu_user:139.53 used_cpu_sys_children:0.00 used_cpu_user_children:0.00
continue | ||
} | ||
fmt.Println(st.Id, len(st.Events), st.Open) | ||
s, err := redis.String(myConn.Do("GET", fmt.Sprintf("renderedTemplatesById:%d", st.Id))) |
kylebrandt
Sep 29, 2017
Author
Member
renderedTemplatesKey(st.Id)
renderedTemplatesKey(st.Id)
2 commits
Oct 10, 2017
added
cmd/bosun/database/state_data.go
Outdated
} | ||
state, err := d.getIncident(id, conn) | ||
if err != nil { | ||
if strings.Contains(err.Error(), "nil returned") { |
kylebrandt
Oct 10, 2017
Author
Member
strings.Contains on error, combined with the match not being a constant doesn't seem safe in the long run.
strings.Contains on error, combined with the match not being a constant doesn't seem safe in the long run.
captncraig
Oct 13, 2017
Contributor
Yeah, the problem there is that the error will already be wrapped at that point, and the inner error is not accessible. I guess I can also make a package function for that test though.
Yeah, the problem there is that the error will already be wrapped at that point, and the inner error is not accessible. I guess I can also make a package function for that test though.
cmd/bosun/database/state_data.go
Outdated
|
||
//ledis uses XSCAN cursor "KV" MATCH foo | ||
//redis uses SCAN cursor MATCH foo | ||
cmd := "SCAN" |
kylebrandt
Oct 10, 2017
Author
Member
Maybe Redis and Ledis SCAN could be a function outside of this that can be reused (and make this func shorter)
Maybe Redis and Ledis SCAN could be a function outside of this that can be reused (and make this func shorter)
captncraig
Oct 13, 2017
Contributor
Yeah, we did that with some others, but the re-ordering of the args makes it tricky. I will factor out.
Yeah, we did that with some others, but the re-ordering of the args makes it tricky. I will factor out.
@captncraig Didn't find any problems testing this out, but needs conflicts resolved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.