Dmitrii Stepanov
692749dba1
Some checks failed
DCO action / DCO (pull_request) Failing after 1m30s
Tests and linters / Run gofumpt (pull_request) Successful in 1m26s
Vulncheck / Vulncheck (pull_request) Successful in 2m11s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m25s
Build / Build Components (pull_request) Successful in 2m29s
Tests and linters / Lint (pull_request) Failing after 2m26s
Tests and linters / gopls check (pull_request) Successful in 2m43s
Tests and linters / Staticcheck (pull_request) Successful in 2m56s
Tests and linters / Tests (pull_request) Successful in 4m22s
Tests and linters / Tests with -race (pull_request) Successful in 5m58s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
25 lines
846 B
Go
25 lines
846 B
Go
package alphabet
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/timers"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event"
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
func (ap *Processor) HandleGasEmission(ev event.Event) {
|
|
_ = ev.(timers.NewAlphabetEmitTick)
|
|
ap.log.Info(context.Background(), logs.AlphabetTick, zap.String("type", "alphabet gas emit"))
|
|
|
|
// send event to the worker pool
|
|
|
|
err := processors.SubmitEvent(ap.pool, ap.metrics, "alphabet_emit_gas", ap.processEmit)
|
|
if err != nil {
|
|
// there system can be moved into controlled degradation stage
|
|
ap.log.Warn(context.Background(), logs.AlphabetAlphabetProcessorWorkerPoolDrained,
|
|
zap.Int("capacity", ap.pool.Cap()))
|
|
}
|
|
}
|