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
def __init__(self, *args, **kwargs): Task.__init__(self, *args, **kwargs) self.event = args[4] # used by Network._stop_callback
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])
def __init__(self, *args, **kwargs): Task.__init__(self, *args, **kwargs) self._store_to_node_task_observer = Observer()