def wait_for_download
      if pending?
        logger.info 'Waiting for first download'

        if logger.respond_to? :flush
          logger.flush
        end

        while pending?
          sleep 0.1
        end
      end
    end
def wait_for_download
      if pending?
        logger.info 'Waiting for first download'

        if logger.respond_to? :flush
          logger.flush
        end

        while pending?
          sleep 0.1
        end
      end
    end
Waits until the first download has finished.