def prepare():
global country_count,countries,file_type,questions,poll_id,write_questions,write_results,results,position,national,worldwide
print "Preparing ..."
if production:
client = Client(sentry_url)
handler = SentryHandler(client)
setup_logging(handler)
logger = logging.getLogger(__name__)
mysql_connect()
if len(sys.argv) == 1: manual_run()
elif len(sys.argv) >= 2:
file_type = sys.argv[1]
if file_type == "q": automatic_questions()
elif file_type == "r": automatic_results()
elif file_type == "v": automatic_votes()
mysql_close()
make_language_table()
评论列表
文章目录