chore: remove more logs that I missed (#159)

This commit is contained in:
Josh Larson 2021-11-09 08:23:08 -06:00 committed by GitHub
parent 2e1bc02e6a
commit 4fe7ea70a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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`);
}
});
}