diff --git a/src/common/http/modifier/auth/auth.go b/src/common/http/modifier/auth/auth.go index a28576ef6..25c042586 100644 --- a/src/common/http/modifier/auth/auth.go +++ b/src/common/http/modifier/auth/auth.go @@ -42,6 +42,6 @@ func (s *SecretAuthorizer) Modify(req *http.Request) error { if req == nil { return errors.New("the request is null") } - secret.AddToRequest(req, s.secret) - return nil + err := secret.AddToRequest(req, s.secret) + return err } diff --git a/src/jobservice/period/sweeper.go b/src/jobservice/period/sweeper.go index 57db4d787..c2d025c23 100644 --- a/src/jobservice/period/sweeper.go +++ b/src/jobservice/period/sweeper.go @@ -41,7 +41,9 @@ func (s *Sweeper) ClearOutdatedScheduledJobs() error { r, err := conn.Do("SET", utils.KeyPeriodicLock(s.namespace), time.Now().Unix(), "EX", 30, "NX") defer func() { //Make sure it can be unlocked if it is not expired yet - conn.Do("DEL", utils.KeyPeriodicLock(s.namespace)) + if _, err := conn.Do("DEL", utils.KeyPeriodicLock(s.namespace)); err != nil { + logger.Errorf("Unlock key '%s' failed with error: %s\n", utils.KeyPeriodicLock(s.namespace), err.Error()) + } }() if err != nil { return err