Skip to content

Commit

Permalink
chore: remove more logs that I missed (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
jplhomer authored Nov 9, 2021
1 parent 2e1bc02 commit 4fe7ea7
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions packages/hydrogen/src/hooks/useQuery/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,14 @@ export function useQuery<T>(
const lockExists = await getItemFromCache(lockKey);
if (lockExists) return;

console.log(`[stale regen] no cache lock`);
await setItemInCache(lockKey, true);
console.log(`[stale regen] set cache lock`);
try {
const output = await generateNewOutput();
console.log(`[stale regen] got new output`);
await setItemInCache(key, output, queryOptions?.cache);
console.log(`[stale regen] set new output`);
} catch (e: any) {
console.error(`Error generating async response: ${e.message}`);
} finally {
await deleteItemFromCache(lockKey);
console.log(`[stale regen] deleted lock`);
}
});
}
Expand Down

0 comments on commit 4fe7ea7

Please sign in to comment.