mirror of
https://github.com/zrepl/zrepl.git
synced 2025-01-22 22:28:47 +01:00
Added SnapJobStatus
This commit is contained in:
parent
19d0916e34
commit
58dcc07430
@ -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}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user