Exemplo n.º 1
0
def connect_mysql():
    g.mysql = sm()
Exemplo n.º 2
0
#!/

import sys
from urllib import urlencode
from urllib2 import urlopen
from redis import Redis
from archive import archive_chat, get_or_create_log, delete_chat
from model import sm
import sqlalchemy.exc
import requests

redis = Redis()
mysql = sm()

print 'Archiving chats'

count = 0
integrity = 0
programming = 0
other = 0

keys = redis.keys('chat.*.meta')

i_error = []
p_error = []
o_error = []

for metadata in keys:
    metasplit = metadata.split('.')
    chat = metasplit[1:2]
    chat_url = ''.join(chat)
Exemplo n.º 3
0
def connect_mysql():
    g.mysql = sm()