예제 #1
0
 def __init__(self, timeout=Network.DEFAULT_TIMEOUT, max_size=None):
     Task.__init__(self)
     self._file = tempfile.SpooledTemporaryFile(1048576)
     self._bytes_queue = queue.Queue(1)
     self.timeout = timeout
     self.last_modified = time.time()
     self.address = None
     self.max_size = max_size
예제 #2
0
 def __init__(self, *args, **kwargs):
     Task.__init__(self, *args, **kwargs)
     self.event = args[4]  # used by Network._stop_callback
예제 #3
0
 def __init__(self, *args, **kwargs):
     Task.__init__(self, *args, **kwargs)
     self.node = args[1]
     self.key = args[2]
     self.index = args[3]
     self.total_size = len(args[4])
예제 #4
0
 def __init__(self, *args, **kwargs):
     Task.__init__(self, *args, **kwargs)
     self._store_to_node_task_observer = Observer()