#!/usr/local/bin/ruby require 'rubygems' require 'dbi' require 'cgi' require 'GINA' begin cgi=CGI.new("html3") web_conf = GINA::load_config("l5_tracker/web_front.yml") conf = GINA::load_config("l5_tracker/database.yml") dbh = DBI.connect(conf['production']['dbi_connector'] , conf['production']['username'], conf['production']['password']) name = "vis_" + (Time.now.to_i % 100000).to_s out = [] start_tm = Time.gm(Time.now().year, Time.now().month, Time.now().day, 0,0,0,0) sql = "select distinct " + " EXTRACT(EPOCH FROM date_trunc('day', time )) as time " + " from " + " l5_frames " + " where " + " time >= '#{Time.now.getgm()}' and time <= '#{Time.now.getgm()+16*24*60*60}'" sth = dbh.prepare(sql) sth.execute out << "" out << " " out << "
" out << " #{e.to_s} " +
" or #{e.backtrace}"
}
}
exit(-1);
end