def getlog(): db = sqlitedb() eventids = db.gettestevent() #print eventids main = barista() result = main.getLog(eventids[0]['eventid']) print result.encode('utf-8')
def perform(eventid): print (eventid) db = sqlitedb() eventrec = db.getactiveevent() for event in eventrec: print event['eventid'] r = ResQ(server="%s:%s" % (resqserver, resqport)) r.enqueue(callQ, event['eventid'])
def activate_events(): db = sqlitedb() eventrec = db.getactiveevent() for event in eventrec: print 'activate_events:found active events %s' % event['eventid'] tw = twiliomanage() result = tw.callrequest(event['eventid']) return
def updatetime(): db = sqlitedb() db.updatelatesttimefortest('tarou') db.updatelatesttimefortest('baijyaku') db.updatelatesttimefortest('kouji') return
def updatestatus(): db = sqlitedb() db.updatelateststatusfortest('baijyaku',1) return
# -*- coding: utf-8 -*- import time import sqlite3 from dbmanage import sqlitedb from pyres import ResQ from callq import callQ import ConfigParser from twiliomanage import twiliomanage conf = ConfigParser.SafeConfigParser() conf.read('settings.ini') resqserver = conf.get('ResQ', 'server') resqport = conf.get('ResQ', 'port') db = sqlitedb() eventrec = db.getactiveevent() for event in eventrec: print event['eventid'] tw = twiliomanage() result = tw.callrequest(event['eventid'])