Added SnapJobStatus

This commit is contained in:
InsanePrawn 2018-11-21 02:08:39 +01:00
parent 19d0916e34
commit 58dcc07430

View File

@ -102,13 +102,17 @@ func (j *SnapJob) RegisterMetrics(registerer prometheus.Registerer) {
registerer.MustRegister(j.promPruneSecs)
}
type SnapJobStatus struct {
Pruning *pruner.Report
}
func (j *SnapJob) Status() *Status {
tasks := j.updateTasks(nil)
s := &ActiveSideStatus{}
s := &SnapJobStatus{}
t := j.Type()
if tasks.pruner != nil {
s.PruningSender = tasks.pruner.Report()
s.Pruning = tasks.pruner.Report()
}
return &Status{Type: t, JobSpecific: s}
}