'Run a reconstruction pass'

def reconstruct(self, **kwargs):

    self._reset_stats()
    self.partition_times = []
    stats = spawn(self.heartbeat)
    lockup_detector = spawn(self.detect_lockups)
    try:
        self.run_pool = GreenPool(size=self.concurrency)
        for part_info in self.collect_parts(**kwargs):
            sleep()
            if (not self.check_ring(part_info['policy'].object_ring)):
                self.logger.info(_('Ring    change    detected.    Aborting    current    reconstruction    pass.'))
                return
            self.reconstruction_part_count += 1
            jobs = self.build_reconstruction_jobs(part_info)
            if (not jobs):
                self.run_pool.spawn(self.delete_partition, part_info['part_path'])
            for job in jobs:
                self.run_pool.spawn(self.process_job, job)
        with Timeout(self.lockup_timeout):
            self.run_pool.waitall()
    except (Exception, Timeout):
        self.logger.exception(_('Exception    in    top-levelreconstruction    loop'))
        self.kill_coros()
    finally:
        stats.kill()
        lockup_detector.kill()
        self.stats_line()
    if self.handoffs_only:
        if (self.handoffs_remaining > 0):
            self.logger.info(_('Handoffs    only    mode    still    has    handoffs    remaining.    Next    pass    will    continue    to    revert    handoffs.'))
        else:
            self.logger.warning(_('Handoffs    only    mode    found    no    handoffs    remaining.    You    should    disable    handoffs_only    once    all    nodes    are    reporting    no    handoffs    remaining.'))
