Skip to content

Commit

Permalink
Increment memento count as processing
Browse files Browse the repository at this point in the history
  • Loading branch information
machawk1 committed Apr 18, 2024
1 parent 2ceb332 commit 2e9d161
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ func generateSummary(urir string, basetm *list.List, format string, dataCh chan
Last Memento
Count int
}

archives := make(map[string]Archive)
for e := basetm.Front(); e != nil; e = e.Next() {
lnk := e.Value.(Link)
Expand Down Expand Up @@ -390,6 +390,8 @@ func generateSummary(urir string, basetm *list.List, format string, dataCh chan
archive.First = memento
archives[hostbuck[2]] = archive
}
archive.Count += 1
archives[hostbuck[2]] = archive
} else {
memento := Memento{lnk.Href, dt}
newarchive := Archive{memento, memento, 1}
Expand Down Expand Up @@ -706,8 +708,6 @@ func memgatorService(w http.ResponseWriter, r *http.Request, urir string, format
http.Redirect(w, r, closest, http.StatusFound)
return
}
// Format is empty string here
fmt.Printf(format)
if format == "timemapsummary" {
go generateSummary(urir, basetm, format, dataCh, navonly, sess)
mime, ok := mimeMap[strings.ToLower(format)]
Expand Down

0 comments on commit 2e9d161

Please sign in to comment.