If import fails report the last timestamp

This commit is contained in:
Philipp Wolfer 2023-11-15 09:20:52 +01:00
parent 4e9f50b6b6
commit bae81d9b08
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B

View file

@ -67,7 +67,10 @@ var listensCmd = &cobra.Command{
// Import into target
result, err := importBackend.ImportListens(listens, timestamp)
cobra.CheckErr(err)
if err != nil {
fmt.Printf("Import failed, last reported timestamp was %v (%v)\n", result.LastTimestamp, result.LastTimestamp.Unix())
cobra.CheckErr(err)
}
fmt.Printf("Imported %v of %v listens into %v.\n",
result.ImportCount, result.TotalCount, targetName)