From 66d005cfd01b0e27f9c954da0a4d8e326c288e04 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 17 Feb 2023 02:35:57 +0000 Subject: check transaction type --- lib/db.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/db.js b/lib/db.js index edf48910..cc9c3919 100644 --- a/lib/db.js +++ b/lib/db.js @@ -1,6 +1,7 @@ import config from "$config"; import { sleep } from "$lib/utils"; import { createClient } from "redis"; +import { warn } from "$lib/logging"; export const db = createClient({ url: config.db }); await db.connect(); @@ -14,7 +15,13 @@ export let g = async k => { return v; } }; -export let s = (k, v) => db.set(k, JSON.stringify(v)); +export let s = (k, v) => { + if (k === "user:null") { + warn("###### NULL USER #######") + console.trace(); + } + db.set(k, JSON.stringify(v)); +} let retries = {}; export let t = async (k, f) => { -- cgit v1.2.3