Пример #1
0
def getlog():
    db = sqlitedb()
    eventids = db.gettestevent()
    #print eventids
    main = barista()
    result = main.getLog(eventids[0]['eventid'])
    print result.encode('utf-8')
Пример #2
0
 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'])
Пример #3
0
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
Пример #4
0
def updatetime():
    db = sqlitedb()
    db.updatelatesttimefortest('tarou')
    db.updatelatesttimefortest('baijyaku')
    db.updatelatesttimefortest('kouji')
    return
Пример #5
0
def updatestatus():
    db = sqlitedb()
    db.updatelateststatusfortest('baijyaku',1)
    return
Пример #6
0
# -*- 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'])