(restore_state, synced_fixtures, purged_fixture_ids)
return sorted(last_sync_times)[0] if last_sync_times else now
Get the oldest sync time for all reports.
Get the oldest sync time for all reports.
Get the oldest sync time for all reports .
def _get_oldest_sync_time(restore_state, synced_fixtures, purged_fixture_ids):
        """
        Get the oldest sync time for all reports.
        """
        last_sync_log = restore_state.last_sync_log
        now = _utcnow()
        if not last_sync_log or restore_state.overwrite_cache:
            return now

        # ignore reports that are being purged or are being synced now
        reports_to_ignore = purged_fixture_ids | {config.uuid for config in synced_fixtures}
        last_sync_times = [
            log.datetime
            for log in last_sync_log.last_ucr_sync_times
            if log.report_uuid not in reports_to_ignore
        ]
        return sorted(last_sync_times)[0] if last_sync_times else now
def _get_oldest_sync_time ( restore_state , synced_fixtures , purged_fixture_ids ) : last_sync_log = restore_state . last_sync_log now = _utcnow ( ) if not last_sync_log or restore_state . overwrite_cache : return now # ignore reports that are being purged or are being synced now reports_to_ignore = purged_fixture_ids | { config . uuid for config in synced_fixtures } last_sync_times = [ log . datetime for log in last_sync_log . last_ucr_sync_times if log . report_uuid not in reports_to_ignore ] return sorted ( last_sync_times ) [ 0 ] if last_sync_times else now