Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumewuip committed Aug 28, 2023
1 parent b95697f commit fcfee68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rss-to-tana/store.js
Expand Up @@ -9,7 +9,7 @@ const client = createClient({
client.on('error', error => console.error('Redis Client Error', error));

// change the prefix to trash all existing ids
const toStoreId = (id) => `1-${id}`
const storeId = (id) => `1-${id}`

const initialize = async () => {
console.log('Connecting to Redis', REDIS_URL)
Expand All @@ -18,13 +18,13 @@ const initialize = async () => {
}

const savedAlready = async (itemId) => {
const nbKeysFound = await client.exists(toStoreId(itemId))
const nbKeysFound = await client.exists(storeId(itemId))
return nbKeysFound === 1
}

const saveItemSaved = async (itemId) => {
await client.set(
toStoreId(itemId),
storeId(itemId),
0,
{
EX: 345600, // 4 days in seconds
Expand Down

0 comments on commit fcfee68

Please sign in to comment.