From 18eb668b6af7dc1992fc34ea9293d5e2e1950422 Mon Sep 17 00:00:00 2001 From: Mo Firouz Date: Tue, 1 May 2018 12:53:51 +0100 Subject: [PATCH] Print notification query in debug log level. --- data/modules/match.lua | 2 +- server/core_notification.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data/modules/match.lua b/data/modules/match.lua index 9e0ea7851..7c0d01953 100644 --- a/data/modules/match.lua +++ b/data/modules/match.lua @@ -197,7 +197,7 @@ local function match_loop(context, dispatcher, tick, state, messages) print("match " .. context.match_id .. " tick " .. tick) print("match " .. context.match_id .. " messages:\n" .. du.print_r(messages)) end - if tick < 180 then + if tick < 10 then return state end end diff --git a/server/core_notification.go b/server/core_notification.go index a72853763..ebe7ea664 100644 --- a/server/core_notification.go +++ b/server/core_notification.go @@ -163,7 +163,9 @@ func NotificationDelete(logger *zap.Logger, db *sql.DB, userID uuid.UUID, notifi params = append(params, id) } - _, err := db.Exec("DELETE FROM notification WHERE user_id = $1 AND id IN ("+strings.Join(statements, ", ")+")", params...) + query := "DELETE FROM notification WHERE user_id = $1 AND id IN (" + strings.Join(statements, ", ") + ")" + logger.Debug("Delete notification query", zap.String("query", query), zap.Any("params", params)) + _, err := db.Exec(query, params...) if err != nil { logger.Error("Could not delete notifications.", zap.Error(err)) return err -- GitLab