Conversation
… 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))) |
There was a problem hiding this comment.
renderedTemplatesKey(st.Id)
cmd/bosun/database/state_data.go
Outdated
| } | ||
| state, err := d.getIncident(id, conn) | ||
| if err != nil { | ||
| if strings.Contains(err.Error(), "nil returned") { |
There was a problem hiding this comment.
strings.Contains on error, combined with the match not being a constant doesn't seem safe in the long run.
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Maybe Redis and Ledis SCAN could be a function outside of this that can be reused (and make this func shorter)
There was a problem hiding this comment.
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. |
No description provided.