MSP-625 remove accounting

This commit is contained in:
DeniskaRediska authored and d1slike committed 2022-07-27 10:43:47 +03:00
1 parent 6a150402d2
commit b0f871d032
17 files changed
+7 -1079

No files matched your search

-9
View File
@@ -10,7 +10,6 @@ import (
"github.com/pkg/errors"
"github.com/valyala/fasthttp"
"google.golang.org/grpc/codes"
"isp-gate-service/accounting"
"isp-gate-service/authenticate"
"isp-gate-service/conf"
"isp-gate-service/domain"
@@ -25,8 +24,6 @@ const (
execution = 1e6
)
var errAccounting = errors.New("accounting error")
type Handler struct {
logger log.Logger
}
@@ -110,12 +107,6 @@ func (h Handler) authenticateAccountingProxy(ctx *fasthttp.RequestCtx) (int32, i
utils.WriteError(ctx, message, status, details)
return appId, adminId, path, domain.Create().SetError(err)
}
if !accounting.AcceptRequest(appId, path) {
err := errAccounting
utils.WriteError(ctx, "too many requests", codes.ResourceExhausted, nil)
return appId, adminId, path, domain.Create().SetError(err)
}
}
return appId, adminId, path, p.ProxyRequest(ctx, path)