'Aggregate per-disk rcache updates from child workers.'

def aggregate_recon_update(self):

    try:
        with open(self.rcache) as f:
            existing_data = json.load(f)
    except IOError as e:
        if (e.errno != errno.ENOENT):
            raise
        existing_data = {}
    first_start = time.time()
    last_finish = 0
    all_devices_reporting = True
    for device in self.all_local_devices:
        per_disk_stats = existing_data.get('object_reconstruction_per_disk', {}).get(device, {})
        try:
            start_time = (per_disk_stats['object_reconstruction_last'] - (per_disk_stats['object_reconstruction_time'] * 60))
            finish_time = per_disk_stats['object_reconstruction_last']
        except KeyError:
            all_devices_reporting = False
            break
        first_start = min(first_start, start_time)
        last_finish = max(last_finish, finish_time)
    if (all_devices_reporting and (last_finish > 0)):
        duration = (last_finish - first_start)
        recon_update = {'object_reconstruction_time': (duration / 60.0), 'object_reconstruction_last': last_finish}
    else:
        recon_update = {}
    found_devices = set(existing_data.get('object_reconstruction_per_disk', {}).keys())
    clear_update = {d: {} for d in found_devices if (d not in self.all_local_devices)}
    if clear_update:
        recon_update['object_reconstruction_per_disk'] = clear_update
    dump_recon_cache(recon_update, self.rcache, self.logger)
