Skip to content

Commit

Permalink
feat(worker): force refresh cache
Browse files Browse the repository at this point in the history
  • Loading branch information
yjl9903 committed Aug 11, 2023
1 parent 31c2f82 commit d41b01b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/worker/src/scheduled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@ export async function handleScheduled(env: Env) {

if (sum > 0) {
await updateRefreshTimestamp(env);
await Promise.all(
PrefetchFilter.map(async (filter) => {
await findResourcesFromDB.clear(env, filter);
await findResourcesFromDB(env, filter);
})
);
}

await Promise.all(
PrefetchFilter.map(async (filter) => {
await findResourcesFromDB.clear(env, filter);
await findResourcesFromDB(env, filter);
})
);

return { count: sum };
}

Expand Down

0 comments on commit d41b01b

Please sign in to comment.