mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-21 16:03:32 +01:00
status: show the current replication attempt's runtime
This commit is contained in:
parent
a58ce74ed0
commit
ab7abd9686
@ -336,6 +336,12 @@ func renderReplicationReport(t *stringbuilder.B, rep *report.Report, history *by
|
||||
|
||||
t.Printf("Status: %s", latest.State)
|
||||
t.Newline()
|
||||
if !latest.FinishAt.IsZero() {
|
||||
t.Printf("Last Run: %s (lasted %s)\n", latest.FinishAt.Round(time.Second), latest.FinishAt.Sub(latest.StartAt).Round(time.Second))
|
||||
} else {
|
||||
t.Printf("Started: %s (lasting %s)\n", latest.StartAt.Round(time.Second), time.Since(latest.StartAt).Round(time.Second))
|
||||
}
|
||||
|
||||
if latest.State == report.AttemptPlanningError {
|
||||
t.Printf("Problem: ")
|
||||
t.PrintfDrawIndentedAndWrappedIfMultiline("%s", latest.PlanError)
|
||||
|
Loading…
Reference in New Issue
Block a user