Skip to content

Commit

Permalink
fix: try using listObjectsV2 instead
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixNgFender committed Oct 18, 2024
1 parent 01c9aec commit f837472
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/cron-monthly-cleanup.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const main = async () => {
}

// Remove all objects from the bucket
const objectsStream = fileStorage.listObjects(process.env.S3_BUCKET_NAME);
const objectsStream = fileStorage.listObjectsV2(process.env.S3_BUCKET_NAME);
console.log(objectsStream);
const incompleteUploadsStream = fileStorage.listIncompleteUploads(
process.env.S3_BUCKET_NAME,
Expand Down Expand Up @@ -93,6 +93,7 @@ const main = async () => {
await tx.execute(sql`DELETE FROM track`);
});

console.info('Deleted all assets and tracks. Exiting...');
process.exit(0);
};

Expand Down

0 comments on commit f837472

Please sign in to comment.