just overwrite bundles, don't delete then re-add
This commit is contained in:
parent
d6ef34a1dc
commit
eb40995c60
3 changed files with 2 additions and 56 deletions
|
|
@ -107,15 +107,9 @@ func main() {
|
|||
os.MkdirAll(cfg.OutputDir, 0755)
|
||||
}
|
||||
|
||||
// Clean old bundles before writing new ones
|
||||
if !cfg.DryRun {
|
||||
fmt.Println("Cleaning old bundles from S3...")
|
||||
if err := s3DeletePrefix(cfg.SiteBucket, "tabs/"); err != nil {
|
||||
log.Fatalf("Failed to clean old bundles: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Stream hosts from DB in pages, convert icons, write bundles incrementally
|
||||
// Bundles are written in-place (overwriting previous run). No delete-first step,
|
||||
// so the live site always has valid data even if bundle gen crashes midway.
|
||||
fmt.Println("Processing hosts and writing bundles...")
|
||||
|
||||
bundleCount := 0
|
||||
|
|
@ -240,10 +234,3 @@ func main() {
|
|||
|
||||
writeStats(stats)
|
||||
}
|
||||
|
||||
func max(a, b int) int {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue