fix: cache links to b2
This commit is contained in:
parent
d8f808fe70
commit
faf0b4c6ee
1 changed files with 2 additions and 1 deletions
|
@ -39,6 +39,7 @@ export default async function () {
|
||||||
const maxRequests = process.env.ELEVENTY_PRODUCTION ? 10 : 2
|
const maxRequests = process.env.ELEVENTY_PRODUCTION ? 10 : 2
|
||||||
let nextPageCursor = null;
|
let nextPageCursor = null;
|
||||||
let requestCount = 0;
|
let requestCount = 0;
|
||||||
|
let cachedLinks;
|
||||||
|
|
||||||
if (process.env.ELEVENTY_PRODUCTION) {
|
if (process.env.ELEVENTY_PRODUCTION) {
|
||||||
const cachedLinksOutput = await client.send(
|
const cachedLinksOutput = await client.send(
|
||||||
|
@ -48,7 +49,7 @@ export default async function () {
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
const cachedLinksData = getReadableData(cachedLinksOutput.Body)
|
const cachedLinksData = getReadableData(cachedLinksOutput.Body)
|
||||||
const cachedLinks = await cachedLinksData.then((tracks) => JSON.parse(tracks)).catch()
|
cachedLinks = await cachedLinksData.then((tracks) => JSON.parse(tracks)).catch()
|
||||||
}
|
}
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
Reference in a new issue