Advertisement
Guest User

Untitled

a guest
May 4th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #!/usr/bin/env tarantool
  2.  
  3. box.cfg {}
  4.  
  5. local log = require('log')
  6. local mysql = require('mysql')
  7. local pool = mysql.pool_create({ host = '127.0.0.1', user = 'root', password = '11', db = 'tempdb', size = 5, raise = true })
  8.  
  9. local i = 0
  10. while true do
  11. local conn = pool:get()
  12. log.info(tostring(i) .. ' : ping')
  13. conn:ping()
  14. pool:put(conn)
  15. i = i + 1
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement