You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
pixiv/PixivSearch/thrift/task/Server.py

22 lines
531 B

import sys
from thrift.server.TNonblockingServer import TNonblockingServer
from thrift.transport import TSocket
sys.path.append('/root/PixivSearch')
from PixivSearch.thrift.task import TSDM
from PixivSearch.thrift.task.TSDM import Iface
class Server(Iface):
def qiandao(self):
return False
def word(self):
return True
if __name__ == '__main__':
socket = TSocket.TServerSocket(port=2233)
processor = TSDM.Processor(Server())
server = TNonblockingServer(processor, socket)
server.serve()