cmd/satellite: remove metrics from gc
Currently metrics could trigger metainfo loop on it's own on GC pod, however running only metrics adds a lot of load, we should only run it together with other essential chores. There's no easy way to join that way in metainfo loop, for now, let's remove it from GC. Satellite Core will still run the metrics. Change-Id: Ie513a9d2f86add0aa319d08567c6cf3542d73d4e
This commit is contained in:
parent
6236deffb9
commit
2a4a70908f
@ -25,7 +25,6 @@ import (
|
||||
"storj.io/storj/satellite/gc"
|
||||
"storj.io/storj/satellite/metainfo"
|
||||
"storj.io/storj/satellite/metainfo/metaloop"
|
||||
"storj.io/storj/satellite/metrics"
|
||||
"storj.io/storj/satellite/overlay"
|
||||
)
|
||||
|
||||
@ -64,10 +63,6 @@ type GarbageCollection struct {
|
||||
GarbageCollection struct {
|
||||
Service *gc.Service
|
||||
}
|
||||
|
||||
Metrics struct {
|
||||
Chore *metrics.Chore
|
||||
}
|
||||
}
|
||||
|
||||
// NewGarbageCollection creates a new satellite garbage collection process.
|
||||
@ -168,21 +163,6 @@ func NewGarbageCollection(log *zap.Logger, full *identity.FullIdentity, db DB,
|
||||
debug.Cycle("Garbage Collection", peer.GarbageCollection.Service.Loop))
|
||||
}
|
||||
|
||||
{ // setup metrics service
|
||||
peer.Metrics.Chore = metrics.NewChore(
|
||||
peer.Log.Named("metrics"),
|
||||
config.Metrics,
|
||||
peer.Metainfo.Loop,
|
||||
)
|
||||
peer.Services.Add(lifecycle.Item{
|
||||
Name: "metrics",
|
||||
Run: peer.Metrics.Chore.Run,
|
||||
Close: peer.Metrics.Chore.Close,
|
||||
})
|
||||
peer.Debug.Server.Panel.Add(
|
||||
debug.Cycle("Metrics", peer.Metrics.Chore.Loop))
|
||||
}
|
||||
|
||||
return peer, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user