delete old tab bundles before making new ones
This commit is contained in:
parent
a977a8c0b3
commit
21f2a75ed3
2 changed files with 43 additions and 1 deletions
|
|
@ -131,8 +131,16 @@ func main() {
|
|||
}
|
||||
wg.Wait()
|
||||
|
||||
// Clean old bundles before writing new ones (avoids orphans if count changed)
|
||||
if !cfg.DryRun {
|
||||
fmt.Println("\nCleaning old bundles from S3...")
|
||||
if err := s3DeletePrefix(ctx, cfg.SiteBucket, "tabs/"); err != nil {
|
||||
log.Fatalf("Failed to clean old bundles: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Chunk into bundles and write
|
||||
fmt.Println("\nWriting bundles...")
|
||||
fmt.Println("Writing bundles...")
|
||||
bundleCount := 0
|
||||
var totalBytes int64
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue