Skip to content

Commit

Permalink
debug: adds more debugging information
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoldknott committed Jan 12, 2024
1 parent 0f06877 commit 0e8bb47
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend_svelte/src/lib/server/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ if ( !building) {
console.log(appConfig.redis_port);
console.log(appConfig.redis_session_db);
redisClient = createClient({url: `${connectionString}/${appConfig.redis_session_db}`})
console.log("🥞 cache - server - createRedisClient - redisClient created");
await redisClient.connect()
console.log("🥞 cache - server - createRedisClient - redisClient connected");
} catch (err) {
console.error("🥞 cache - server - createRedisClient - createClient failed");
// consider let that error bubble up to the caller - in prod a failed redis connection should be fatal!
Expand All @@ -29,7 +31,7 @@ if ( !building) {
}
}

const getDummys = async () => {
const getDummies = async () => {
const debugDummy = await redisClient?.get("debugDummy");
console.log("🥞 cache - server - debugDummy");
console.log(debugDummy);
Expand All @@ -38,7 +40,7 @@ const getDummys = async () => {
console.log(debugDummyJson);
return { debugDummy, debugDummyJson }
}
const dummies = await getDummys()
const dummies = await getDummies()
console.log("🥞 cache - server - initial dummies");
console.log(dummies);

Expand Down

0 comments on commit 0e8bb47

Please sign in to comment.