Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 87e0f9d

Browse files
committed
Merge branch '189-disable-query-locks-in-chat' into 'master'
fix: temporary disable query locks in chat messages See merge request postgres-ai/joe!181
2 parents 65c510c + 1f61331 commit 87e0f9d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

‎pkg/bot/command/explain.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const (
3434
queryExplainAnalyze = "EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) "
3535

3636
// locksTitle shows locks for a single query analyzed with EXPLAIN.
37-
locksTitle = "*Query heavy locks:*\n"
37+
// locksTitle = "*Query heavy locks:*\n".
3838
)
3939

4040
// Explain runs an explain query.
@@ -117,13 +117,16 @@ func Explain(ctx context.Context, msgSvc connection.Messenger, command *platform
117117

118118
queryLocks := tableString.String()
119119
command.QueryLocks = strings.Trim(queryLocks, "`")
120-
msg.AppendText(locksTitle + queryLocks)
121120

122-
if err = msgSvc.UpdateText(msg); err != nil {
123-
log.Err("Show the plan with execution:", err)
121+
// TODO: Commented out because LISTEN/NOTIFY payload is limited to 8000 characters
122+
// Waiting for fixing: https://gitlab.com/postgres-ai/platform/-/merge_requests/255
123+
// msg.AppendText(locksTitle + queryLocks)
124124

125-
return err
126-
}
125+
// if err = msgSvc.UpdateText(msg); err != nil {
126+
// log.Err("Show the plan with execution:", err)
127+
//
128+
// return err
129+
// }
127130

128131
if _, err := msgSvc.AddArtifact("plan-json", explainAnalyze, msg.ChannelID, msg.MessageID); err != nil {
129132
log.Err("File upload failed:", err)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /