'If there are async pendings on the device, walk each one and update.
:param device: path to device'

def object_sweep(self, device):

    start_time = time.time()
    for asyncdir in self._listdir(device):
        async_pending = os.path.join(device, asyncdir)
        if (not os.path.isdir(async_pending)):
            continue
        if (not asyncdir.startswith(ASYNCDIR_BASE)):
            continue
        try:
            (base, policy) = split_policy_string(asyncdir)
        except PolicyError as e:
            self.logger.warning((_('Directory    %(directory)r    does    not    map    to    a    valid    policy    (%(error)s)') % {'directory': asyncdir, 'error': e}))
            continue
        for prefix in self._listdir(async_pending):
            prefix_path = os.path.join(async_pending, prefix)
            if (not os.path.isdir(prefix_path)):
                continue
            last_obj_hash = None
            for update in sorted(self._listdir(prefix_path), reverse=True):
                update_path = os.path.join(prefix_path, update)
                if (not os.path.isfile(update_path)):
                    continue
                try:
                    (obj_hash, timestamp) = update.split('-')
                except ValueError:
                    self.logger.increment('errors')
                    self.logger.error((_('ERROR    async    pending    file    with    unexpected    name    %s') % update_path))
                    continue
                if (obj_hash == last_obj_hash):
                    self.logger.increment('unlinks')
                    os.unlink(update_path)
                else:
                    self.process_object_update(update_path, device, policy)
                    last_obj_hash = obj_hash
                self.objects_running_time = ratelimit_sleep(self.objects_running_time, self.max_objects_per_second)
            try:
                os.rmdir(prefix_path)
            except OSError:
                pass
        self.logger.timing_since('timing', start_time)
