Guest User

Untitled

a guest
Apr 26th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2. $:.unshift File.dirname(__FILE__) + '/../../lib/'
  3. require 'rubygems'
  4. require 'q4m'
  5.  
  6. database = "test_q4m"
  7. table = "example_json_queue_monitor"
  8. sql = "CREATE TABLE IF NOT EXISTS #{table} (v TEXT NOT NULL) ENGINE=QUEUE;"
  9.  
  10. begin
  11. dbh = DBI.connect "DBI:Mysql:database=#{database}", "root", ""
  12. dbh.do sql
  13. rescue
  14. p "ERROR: #{$!}"
  15. end
Add Comment
Please, Sign In to add comment