#!/usr/bin/python
#!coding: utf-8

import redis
import sys

if __name__=="__main__":
    try:
        conn=redis.StrictRedis('192.168.80.41')
        pipe=conn.pipeline()
        pipe.sadd('s001','a')
        sys.exit()
        #在事务还没有提交前退出,所以事务不会被执行。
        pipe.sadd('s001','b')
        pipe.execute()
        pass
    except Exception as err:
        print(err)
        pass

 

相关文章:

  • 2021-12-25
  • 2022-01-15
  • 2021-05-25
  • 2021-09-20
  • 2022-02-24
  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-13
  • 2021-09-12
  • 2021-10-31
  • 2020-04-19
  • 2021-12-15
  • 2021-11-23
  • 2022-12-23
相关资源
相似解决方案