mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-13 00:26:40 +02:00
Add additional information about sync status to hishtory status -v
for debugging purposes
This commit is contained in:
parent
c73b10011b
commit
4bc23c9575
@ -23,11 +23,25 @@ var statusCmd = &cobra.Command{
|
|||||||
fmt.Printf("User ID: %s\n", data.UserId(config.UserSecret))
|
fmt.Printf("User ID: %s\n", data.UserId(config.UserSecret))
|
||||||
fmt.Printf("Device ID: %s\n", config.DeviceId)
|
fmt.Printf("Device ID: %s\n", config.DeviceId)
|
||||||
printDumpStatus(config)
|
printDumpStatus(config)
|
||||||
|
printOnlineStatus(config)
|
||||||
}
|
}
|
||||||
fmt.Printf("Commit Hash: %s\n", lib.GitCommit)
|
fmt.Printf("Commit Hash: %s\n", lib.GitCommit)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func printOnlineStatus(config hctx.ClientConfig) {
|
||||||
|
if config.IsOffline {
|
||||||
|
fmt.Println("Sync Mode: Disabled")
|
||||||
|
} else {
|
||||||
|
fmt.Println("Sync Mode: Enabled")
|
||||||
|
if config.HaveMissedUploads {
|
||||||
|
fmt.Println("Sync Status: Unsynced (device is offline?)")
|
||||||
|
} else {
|
||||||
|
fmt.Println("Sync Status: Synced")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func printDumpStatus(config hctx.ClientConfig) {
|
func printDumpStatus(config hctx.ClientConfig) {
|
||||||
dumpRequests, err := lib.GetDumpRequests(config)
|
dumpRequests, err := lib.GetDumpRequests(config)
|
||||||
lib.CheckFatalError(err)
|
lib.CheckFatalError(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user