923f84722a
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
21 lines
592 B
Go
21 lines
592 B
Go
package alphabet
|
|
|
|
import (
|
|
"github.com/TrueCloudLab/frostfs-node/pkg/innerring/timers"
|
|
"github.com/TrueCloudLab/frostfs-node/pkg/morph/event"
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
func (ap *Processor) HandleGasEmission(ev event.Event) {
|
|
_ = ev.(timers.NewAlphabetEmitTick)
|
|
ap.log.Info("tick", zap.String("type", "alphabet gas emit"))
|
|
|
|
// send event to the worker pool
|
|
|
|
err := ap.pool.Submit(func() { ap.processEmit() })
|
|
if err != nil {
|
|
// there system can be moved into controlled degradation stage
|
|
ap.log.Warn("alphabet processor worker pool drained",
|
|
zap.Int("capacity", ap.pool.Cap()))
|
|
}
|
|
}
|