master
WuXianChaoPin 7 years ago
parent 667c78dc22
commit 972e42fa36
  1. 1
      PixivSearch/aliyun/photo/AliyunPhoto.py
  2. 2
      PixivSearch/thrift/TestQry/Client.py
  3. 7
      PixivSearch/thrift/TestQry/Server.py

@ -66,7 +66,6 @@ class MyClient(AcsClient):
self.listPhotoStores()
request = CreateTransactionRequest.CreateTransactionRequest()
filePath = input('输入上传文件路径\n').replace('\\', '/')
filePath = 'C:/Users/47418/Desktop/照片/IMG_20170218_212837.jpg'
fileName = filePath.split('/')[-1]
request.set_Size(os.path.getsize(filePath))
request.set_Ext(fileName[-fileName[::-1].index('.'):])

@ -22,4 +22,4 @@ if __name__ == '__main__':
# Create a client to use the protocol encoder
client = Client(protocol)
print(client.qryTest(0))
print(client.qryTest(1))

@ -1,8 +1,5 @@
from thrift.protocol import TBinaryProtocol
from thrift.protocol.TBinaryProtocol import TBinaryProtocolFactory
from thrift.server.TNonblockingServer import TNonblockingServer
from thrift.transport import TSocket
from thrift.transport.TTransport import TFramedTransport
from PixivSearch.thrift.TestQry import TestQry
from PixivSearch.thrift.TestQry.ttypes import QryResult
@ -22,8 +19,8 @@ class QueryImpl(TestQry.Iface):
if __name__ == '__main__':
socket = TSocket.TSocket(port=2233)
socket = TSocket.TServerSocket(port=2233)
processor = TestQry.Processor(QueryImpl())
server = TNonblockingServer(processor, socket, TBinaryProtocolFactory(), TFramedTransport())
server = TNonblockingServer(processor, socket)
server.serve()

Loading…
Cancel
Save