aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/db.js9
1 files changed, 8 insertions, 1 deletions
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) => {