diff --git a/.changeset/six-mirrors-double.md b/.changeset/six-mirrors-double.md new file mode 100644 index 0000000..7480b3a --- /dev/null +++ b/.changeset/six-mirrors-double.md @@ -0,0 +1,5 @@ +--- +"google-indexing-script": minor +--- + +Don't want the same URL use my API limit again until his previous cache limit is completed diff --git a/src/index.ts b/src/index.ts index abd6a4b..04076de 100644 --- a/src/index.ts +++ b/src/index.ts @@ -109,7 +109,7 @@ export const index = async (input: string = process.argv[2], options: IndexOptio const shouldRecheck = (status: Status, lastCheckedAt: string) => { const shouldIndexIt = indexableStatuses.includes(status); const isOld = new Date(lastCheckedAt) < new Date(Date.now() - CACHE_TIMEOUT); - return shouldIndexIt || isOld; + return shouldIndexIt && isOld;; }; await batch(