diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 10:46:28 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 10:46:28 +0100 |
commit | ce1c2b6b05c08b669357947e61ae40efce7fc50f (patch) | |
tree | 0b5f7996960cf35c4eface53a89eba18a37519b7 /pyload/remote/ThriftBackend.py | |
parent | Fix filename case (diff) | |
download | pyload-ce1c2b6b05c08b669357947e61ae40efce7fc50f.tar.xz |
module temp
Diffstat (limited to 'pyload/remote/ThriftBackend.py')
-rw-r--r-- | pyload/remote/ThriftBackend.py | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/pyload/remote/ThriftBackend.py b/pyload/remote/ThriftBackend.py deleted file mode 100644 index 16917cfc9..000000000 --- a/pyload/remote/ThriftBackend.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -# @author: RaNaN, mkaay - -from os.path import exists - -from pyload.manager.Remote import BackendBase - -from pyload.remote.thriftbackend.Processor import Processor -from pyload.remote.thriftbackend.Protocol import ProtocolFactory -from pyload.remote.thriftbackend.Socket import ServerSocket -from pyload.remote.thriftbackend.Transport import TransportFactory -#from pyload.remote.thriftbackend.Transport import TransportFactoryCompressed - -from thrift.server import TServer - -class ThriftBackend(BackendBase): - def setup(self, host, port): - processor = Processor(self.core.api) - - key = None - cert = None - - if self.core.config['ssl']['activated']: - if exists(self.core.config['ssl']['cert']) and exists(self.core.config['ssl']['key']): - self.core.log.info(_("Using SSL ThriftBackend")) - key = self.core.config['ssl']['key'] - cert = self.core.config['ssl']['cert'] - - transport = ServerSocket(port, host, key, cert) - - -# tfactory = TransportFactoryCompressed() - tfactory = TransportFactory() - pfactory = ProtocolFactory() - - self.server = TServer.TThreadedServer(processor, transport, tfactory, pfactory) - #self.server = TNonblockingServer.TNonblockingServer(processor, transport, tfactory, pfactory) - - #server = TServer.TThreadPoolServer(processor, transport, tfactory, pfactory) - - def serve(self): - self.server.serve() |