码上敲享录 > redis数据库常见问题 > 解决Please close pipeline or multi block before calling this method.

解决Please close pipeline or multi block before calling this method.

上一章章节目录下一章 2018-11-06已有3009人阅读 评论(0)

redis.clients.jedis.exceptions.JedisDataException: Please close pipeline or multi block before calling this method.


解决方法:

Pipeline pip = jedis.pipelined();

Response<Long> smsCount=pip.hincrBy(keyName, field, -count);

if(smsCount.get()<0){

}


修改:

Pipeline pip = jedis.pipelined();

Response<Long> smsCount=pip.hincrBy(keyName, field, -count);    

pip.sync();//同步

if(smsCount.get()<0){

       

       }


本文链接:http://www.yayihouse.com/yayishuwu/chapter/1668


0

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交