Fix queue pop error and stat empty repository error (#10248)
* Fix queue pop error and stat empty repository error * Fix error
This commit is contained in:
parent
83a8944fcf
commit
3d69bbd58f
3 changed files with 8 additions and 2 deletions
|
@ -121,7 +121,7 @@ func (fifo *RedisByteFIFO) PushFunc(data []byte, fn func() error) error {
|
|||
// Pop pops data from the start of the fifo
|
||||
func (fifo *RedisByteFIFO) Pop() ([]byte, error) {
|
||||
data, err := fifo.client.LPop(fifo.queueName).Bytes()
|
||||
if err != nil && err == redis.Nil {
|
||||
if err == nil || err == redis.Nil {
|
||||
return data, nil
|
||||
}
|
||||
return data, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue