Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
Merge pull request #307 from CameronRP/add-prune-delay
Browse files Browse the repository at this point in the history
Added delay between getting keys from object store and DB
  • Loading branch information
CameronRP authored Feb 13, 2020
2 parents 0719a63 + b6d9f80 commit b257f97
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions prune-objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ async function main() {
);
console.log(`loaded ${bucketKeys.size} keys from the object store`);

console.log("waiting 20 minutes before getting keys from database to give uploading recordings time to finish");
await new Promise(r => setTimeout(r, 1000*60*20)); // Sleep 20 minutes
console.log("getting keys from the database");
const dbKeys = await loadAllDBKeys(pgClient, keyTypes);
console.log(`${dbKeys.size} keys loaded from the database`);

Expand Down

0 comments on commit b257f97

Please sign in to comment.