Commit 18eb668b authored by Mo Firouz's avatar Mo Firouz
Browse files

Print notification query in debug log level.

parent 4b4b2661
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+3 −1
Original line number Diff line number Diff line
@@ -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