queue: refactor redis queue, use brpop instead of rpop in loop