MCPcopy
hub / github.com/kopia/kopia / displayCycleInfo

Method displayCycleInfo

cli/command_maintenance_info.go:106–118  ·  view source on GitHub ↗
(cp *maintenance.CycleParams, t time.Time, rep repo.DirectRepository)

Source from the content-addressed store, hash-verified

104}
105
106func (c *commandMaintenanceInfo) displayCycleInfo(cp *maintenance.CycleParams, t time.Time, rep repo.DirectRepository) {
107 c.out.printStdout(" scheduled: %v\n", cp.Enabled)
108
109 if cp.Enabled {
110 c.out.printStdout(" interval: %v\n", cp.Interval)
111
112 if rep.Time().Before(t) {
113 c.out.printStdout(" next run: %v (in %v)\n", formatTimestamp(t), t.Sub(clock.Now()).Truncate(time.Second))
114 } else {
115 c.out.printStdout(" next run: now\n")
116 }
117 }
118}
119
120func getMessageFromRun(extra []maintenancestats.Extra) string {
121 succeed := "SUCCESS"

Callers 1

runMethod · 0.95

Calls 6

NowFunction · 0.92
formatTimestampFunction · 0.85
printStdoutMethod · 0.80
SubMethod · 0.80
TimeMethod · 0.65
BeforeMethod · 0.45

Tested by

no test coverage detected