mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-23 21:17:56 +02:00
Import result can report total and processed items
This commit is contained in:
parent
516de905bd
commit
ead323eaed
5 changed files with 14 additions and 7 deletions
|
@ -48,7 +48,8 @@ var listensCmd = &cobra.Command{
|
|||
cobra.CheckErr(err)
|
||||
result, err := importBackend.ImportListens(listens, timestamp)
|
||||
cobra.CheckErr(err)
|
||||
fmt.Printf("Imported %v listens (last timestamp %v)\n", result.Count, result.LastTimestamp)
|
||||
fmt.Printf("Imported %v of %v listens (last timestamp %v)\n",
|
||||
result.ImportCount, result.TotalCount, result.LastTimestamp)
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,8 @@ var lovesCmd = &cobra.Command{
|
|||
cobra.CheckErr(err)
|
||||
result, err := importBackend.ImportLoves(loves, timestamp)
|
||||
cobra.CheckErr(err)
|
||||
fmt.Printf("Imported %v loves (last timestamp %v)\n", result.Count, result.LastTimestamp)
|
||||
fmt.Printf("Imported %v of %v loves (last timestamp %v)\n",
|
||||
result.ImportCount, result.TotalCount, result.LastTimestamp)
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue