Skip to content

Commit

Permalink
Merge pull request #15 from SmilyOrg:log-hotfix
Browse files Browse the repository at this point in the history
Logging error hotfix
  • Loading branch information
SmilyOrg authored Jul 31, 2022
2 parents 0591174 + 2cdf637 commit 9dbf0de
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 9dbf0de

Please sign in to comment.