diff options
Diffstat (limited to 'module/remote')
| -rw-r--r-- | module/remote/thriftbackend/pyload.thrift | 1 | ||||
| -rwxr-xr-x | module/remote/thriftbackend/thriftgen/pyload/Pyload-remote | 7 | ||||
| -rw-r--r-- | module/remote/thriftbackend/thriftgen/pyload/Pyload.py | 100 | 
3 files changed, 108 insertions, 0 deletions
| diff --git a/module/remote/thriftbackend/pyload.thrift b/module/remote/thriftbackend/pyload.thrift index d73021725..ebe1890e3 100644 --- a/module/remote/thriftbackend/pyload.thrift +++ b/module/remote/thriftbackend/pyload.thrift @@ -221,6 +221,7 @@ service Pyload {    // parses results and generates packages    OnlineCheck checkOnlineStatus(1: LinkList urls), +  OnlineCheck checkOnlineStatusContainer(1: LinkList urls, 2: string filename, 3: binary data)    // poll results from previosly started online check    OnlineCheck pollResults(1: ResultID rid), diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote index cdae7ac2a..8c2b368e1 100755 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote @@ -43,6 +43,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':    print '   checkURLs(LinkList urls)'    print '   parseURLs(string html)'    print '  OnlineCheck checkOnlineStatus(LinkList urls)' +  print '  OnlineCheck checkOnlineStatusContainer(LinkList urls, string filename, string data)'    print '  OnlineCheck pollResults(ResultID rid)'    print '   statusDownloads()'    print '  PackageData getPackageData(PackageID pid)' @@ -261,6 +262,12 @@ elif cmd == 'checkOnlineStatus':      sys.exit(1)    pp.pprint(client.checkOnlineStatus(eval(args[0]),)) +elif cmd == 'checkOnlineStatusContainer': +  if len(args) != 3: +    print 'checkOnlineStatusContainer requires 3 args' +    sys.exit(1) +  pp.pprint(client.checkOnlineStatusContainer(eval(args[0]),args[1],args[2],)) +  elif cmd == 'pollResults':    if len(args) != 1:      print 'pollResults requires 1 args' diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py index 008c42a56..816c6e7d1 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -106,6 +106,15 @@ class Iface(object):      """      pass +  def checkOnlineStatusContainer(self, urls, filename, data): +    """ +    Parameters: +     - urls +     - filename +     - data +    """ +    pass +    def pollResults(self, rid):      """      Parameters: @@ -956,6 +965,40 @@ class Client(Iface):        return result.success      raise TApplicationException(TApplicationException.MISSING_RESULT, "checkOnlineStatus failed: unknown result"); +  def checkOnlineStatusContainer(self, urls, filename, data): +    """ +    Parameters: +     - urls +     - filename +     - data +    """ +    self.send_checkOnlineStatusContainer(urls, filename, data) +    return self.recv_checkOnlineStatusContainer() + +  def send_checkOnlineStatusContainer(self, urls, filename, data): +    self._oprot.writeMessageBegin('checkOnlineStatusContainer', TMessageType.CALL, self._seqid) +    args = checkOnlineStatusContainer_args() +    args.urls = urls +    args.filename = filename +    args.data = data +    args.write(self._oprot) +    self._oprot.writeMessageEnd() +    self._oprot.trans.flush() + +  def recv_checkOnlineStatusContainer(self, ): +    (fname, mtype, rseqid) = self._iprot.readMessageBegin() +    if mtype == TMessageType.EXCEPTION: +      x = TApplicationException() +      x.read(self._iprot) +      self._iprot.readMessageEnd() +      raise x +    result = checkOnlineStatusContainer_result() +    result.read(self._iprot) +    self._iprot.readMessageEnd() +    if result.success is not None: +      return result.success +    raise TApplicationException(TApplicationException.MISSING_RESULT, "checkOnlineStatusContainer failed: unknown result"); +    def pollResults(self, rid):      """      Parameters: @@ -2367,6 +2410,7 @@ class Processor(Iface, TProcessor):      self._processMap["checkURLs"] = Processor.process_checkURLs      self._processMap["parseURLs"] = Processor.process_parseURLs      self._processMap["checkOnlineStatus"] = Processor.process_checkOnlineStatus +    self._processMap["checkOnlineStatusContainer"] = Processor.process_checkOnlineStatusContainer      self._processMap["pollResults"] = Processor.process_pollResults      self._processMap["statusDownloads"] = Processor.process_statusDownloads      self._processMap["getPackageData"] = Processor.process_getPackageData @@ -2651,6 +2695,17 @@ class Processor(Iface, TProcessor):      oprot.writeMessageEnd()      oprot.trans.flush() +  def process_checkOnlineStatusContainer(self, seqid, iprot, oprot): +    args = checkOnlineStatusContainer_args() +    args.read(iprot) +    iprot.readMessageEnd() +    result = checkOnlineStatusContainer_result() +    result.success = self._handler.checkOnlineStatusContainer(args.urls, args.filename, args.data) +    oprot.writeMessageBegin("checkOnlineStatusContainer", TMessageType.REPLY, seqid) +    result.write(oprot) +    oprot.writeMessageEnd() +    oprot.trans.flush() +    def process_pollResults(self, seqid, iprot, oprot):      args = pollResults_args()      args.read(iprot) @@ -3784,6 +3839,51 @@ class checkOnlineStatus_result(TBase):      self.success = success +class checkOnlineStatusContainer_args(TBase): +  """ +  Attributes: +   - urls +   - filename +   - data +  """ + +  __slots__ = [  +    'urls', +    'filename', +    'data', +   ] + +  thrift_spec = ( +    None, # 0 +    (1, TType.LIST, 'urls', (TType.STRING,None), None, ), # 1 +    (2, TType.STRING, 'filename', None, None, ), # 2 +    (3, TType.STRING, 'data', None, None, ), # 3 +  ) + +  def __init__(self, urls=None, filename=None, data=None,): +    self.urls = urls +    self.filename = filename +    self.data = data + + +class checkOnlineStatusContainer_result(TBase): +  """ +  Attributes: +   - success +  """ + +  __slots__ = [  +    'success', +   ] + +  thrift_spec = ( +    (0, TType.STRUCT, 'success', (OnlineCheck, OnlineCheck.thrift_spec), None, ), # 0 +  ) + +  def __init__(self, success=None,): +    self.success = success + +  class pollResults_args(TBase):    """    Attributes: | 
