MSP-1540 remove redundant logging on controller/repo/service
This commit is contained in:
1 parent
1880bd43e5
commit
00a5c4729e
3 files changed
-8
No files matched your search
@@ -29,7 +29,6 @@ type Locker struct {
|
||||
// @Success 200 {object} domain.LockResponse
|
||||
// @Router /api/isp-lock-service/lock [POST]
|
||||
func (l Locker) Lock(ctx context.Context, req domain.LockRequest) (*domain.LockResponse, error) {
|
||||
l.logger.Debug(ctx, "call ctrl.Lock")
|
||||
return l.s.Lock(ctx, req)
|
||||
}
|
||||
|
||||
@@ -43,7 +42,6 @@ func (l Locker) Lock(ctx context.Context, req domain.LockRequest) (*domain.LockR
|
||||
// @Success 200
|
||||
// @Router /api/isp-lock-service/unlock [POST]
|
||||
func (l Locker) UnLock(ctx context.Context, req domain.UnLockRequest) (*domain.LockResponse, error) {
|
||||
l.logger.Debug(ctx, "call ctrl.UnLock")
|
||||
return l.s.UnLock(ctx, req)
|
||||
}
|
||||
|
||||
|
||||
@@ -47,8 +47,6 @@ func NewLocker(logger log.Logger, cfg conf.Remote) Locker {
|
||||
}
|
||||
|
||||
func (l Locker) Lock(ctx context.Context, key string, ttl int) (*domain.LockResponse, error) {
|
||||
l.logger.Debug(ctx, "call repo.Lock")
|
||||
|
||||
key = makeKey(l.prefix, key)
|
||||
|
||||
mtx := l.cli.NewMutex(key, redsync.WithExpiry(time.Duration(ttl)*time.Second))
|
||||
@@ -63,8 +61,6 @@ func (l Locker) Lock(ctx context.Context, key string, ttl int) (*domain.LockResp
|
||||
}
|
||||
|
||||
func (l Locker) UnLock(ctx context.Context, key, lockKey string) (*domain.LockResponse, error) {
|
||||
l.logger.Debug(ctx, "call repo.UnLock")
|
||||
|
||||
key = makeKey(l.prefix, key)
|
||||
|
||||
_, err := l.cli.NewMutex(key, redsync.WithValue(lockKey)).Unlock()
|
||||
|
||||
@@ -19,13 +19,11 @@ type Locker struct {
|
||||
}
|
||||
|
||||
func (l Locker) Lock(ctx context.Context, req domain.LockRequest) (*domain.LockResponse, error) {
|
||||
l.logger.Debug(ctx, "call srv.Lock")
|
||||
// nolint: wrapcheck
|
||||
return l.repo.Lock(ctx, req.Key, req.TTLInSec)
|
||||
}
|
||||
|
||||
func (l Locker) UnLock(ctx context.Context, req domain.UnLockRequest) (*domain.LockResponse, error) {
|
||||
l.logger.Debug(ctx, "call srv.UnLock")
|
||||
// nolint: wrapcheck
|
||||
return l.repo.UnLock(ctx, req.Key, req.LockKey)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user