mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
feat(metrics): add scheduler related metrics (#2076)
Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
@@ -5,6 +5,7 @@ package sync
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/containers/common/pkg/retry"
|
||||
"github.com/containers/image/v5/types"
|
||||
@@ -137,3 +138,12 @@ func newSyncRepoTask(repo string, service Service) *syncRepoTask {
|
||||
func (srt *syncRepoTask) DoWork(ctx context.Context) error {
|
||||
return srt.service.SyncRepo(ctx, srt.repo)
|
||||
}
|
||||
|
||||
func (srt *syncRepoTask) String() string {
|
||||
return fmt.Sprintf("{Name: \"%s\", repo: \"%s\"}",
|
||||
srt.Name(), srt.repo)
|
||||
}
|
||||
|
||||
func (srt *syncRepoTask) Name() string {
|
||||
return "SyncTask"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user