code: def multiupload(self, filename, hosts):
          
          manager = Manager()
          successful_uploads = manager.list([])
  
          def f(host):
              if len(successful_uploads) / float(len(hosts)) < \
                      settings.MIN_FILE_REDUNDANCY:
                  # Optimal redundancy not achieved, keep going
                  result = self.upload_to_host(filename, host)
                  if 'error' in result:
                      self._host_errors[host] += 1
                  else:
                      successful_uploads.append(result)
  
          multiprocessing.dummy.Pool(len(hosts)).map(
              f, self._hosts_by_success(hosts))
  
          return list(successful_uploads)
docs: Upload file to multiple hosts simultaneously
  
          The upload will be attempted for each host until the optimal file
          redundancy is achieved (a percentage of successful uploads) or the host
          list is depleted.
  
          :param filename: The filename of the file to upload.
          :type filename: str
          :param hosts: A list of hosts as defined in the master host list.
          :type hosts: list
          :returns:  A list of dicts with 'host_name' and 'url' keys for all
                     successful uploads or an empty list if all uploads failed.
          :rtype: list