redisdbx.lua 352 B

12345678910111213141516171819
  1. local redisdbx = {}
  2. local skynet = require "skynet"
  3. local REDISABL_POOL
  4. local function block_query()
  5. if not REDISABL_POOL then
  6. REDISABL_POOL = skynet.queryservice("redisdbpool")
  7. end
  8. end
  9. function redisdbx.exec(cmd, uid, ...)
  10. block_query()
  11. return skynet.call(REDISABL_POOL, "lua", "exec", cmd, uid, ...)
  12. end
  13. return redisdbx