Skip to content

Commit

Permalink
Logging error hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
SmilyOrg committed Jul 31, 2022
1 parent 1d8a3dd commit 2cdf637
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,10 @@ func main() {
for i := range collections {
collection := &collections[i]
collection.UpdateStatus(imageSource)
indexedAgo := durafmt.Parse(time.Since(*collection.IndexedAt)).LimitFirstN(1)
indexedAgo := "N/A"
if collection.IndexedAt != nil {
indexedAgo = durafmt.Parse(time.Since(*collection.IndexedAt)).LimitFirstN(1).String()
}
log.Printf(" %v - %v files indexed %v ago", collection.Name, collection.IndexedCount, indexedAgo)
}

Expand Down

0 comments on commit 2cdf637

Please sign in to comment.