Exemplo n.º 1
0
    def __init__(self):
        self.userInfoQueue = PriorityQueue()
        self.userBaseinfoQueue = PriorityQueue()
        self.userTimelineQueue = PriorityQueue()
        self.userFriendsQueue = PriorityQueue()

        self.serverconfig = common.getDispatchServerConfig()
        self.__serverIP = self.serverconfig[0]
        self.__serverPort = int(self.serverconfig[1])
        self.__twuserhelper = twuserhelper.TWUserHelper()
Exemplo n.º 2
0
 def __init__(self):
     self.fbCheckQueue = PriorityQueue()
     self.fbTaskUserQueue = PriorityQueue()
     self.fbTaskLandmarkQueue = PriorityQueue()
     self.serverconfig = common.getDispatchServerConfig()
     self.__serverIP = serverconfig[0]
     self.__serverPort = int(serverconfig[1])
     self.__fbcheckhelper = FBCheckHelper.FBCheckHelper()
     self.__fbuserhelper = FBUserHelper.FBUserHelper()
     self.__fblandmarkhelper = FBLandmarkHelper.FBLandmarkHelper()
Exemplo n.º 3
0
import xmlrpc.client
import logging, sys
import datetime
import random

import common
from common import *
import FBUserHelper, FBUserCrawler
from utility import OurFBAccount
from utility import FBHelper, FBBaseUser
from loghelper.loghelper import logHelper

import socket

#远程服务代理
serverconfig = common.getDispatchServerConfig()  # 3
serProxy = xmlrpc.client.ServerProxy('http://{0}:{1}'.format(
    serverconfig[0], serverconfig[1]))

# def getatask(taskType):
#    return serProxy.getATask(taskType)


def getFBUserTask(tasktype):
    return serProxy.getATaskUser(tasktype)


def reportFBTaskUserComplete(taskid, runningState, completeDescription):
    return serProxy.reportFBTaskUserComplete(taskid, runningState,
                                             completeDescription)