feat(server): resolved a possible race condition on replication on frest first boot up and fixed making values optional on create rows for generate schema

This commit is contained in:
Akhil Mohan
2024-02-26 19:52:38 +05:30
parent 7d8b399102
commit 8aaed739d5
61 changed files with 211 additions and 126 deletions
+6 -1
View File
@@ -9,5 +9,10 @@ export const keyStoreFactory = (redisUrl: string) => {
const getItem = async (key: string) => redis.get(key);
return { setItem, getItem };
const setItemWithExpiry = async (key: string, exp: number | string, value: string | number | Buffer) =>
redis.setex(key, exp, value);
const deleteItem = async (key: string) => redis.del(key);
return { setItem, getItem, setItemWithExpiry, deleteItem };
};