mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-16 10:09:28 +02:00
If import fails report the last timestamp
This commit is contained in:
parent
4e9f50b6b6
commit
bae81d9b08
1 changed files with 4 additions and 1 deletions
|
@ -67,7 +67,10 @@ var listensCmd = &cobra.Command{
|
||||||
|
|
||||||
// Import into target
|
// Import into target
|
||||||
result, err := importBackend.ImportListens(listens, timestamp)
|
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",
|
fmt.Printf("Imported %v of %v listens into %v.\n",
|
||||||
result.ImportCount, result.TotalCount, targetName)
|
result.ImportCount, result.TotalCount, targetName)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue