def __onSyncComplete(self, syncID, data): if data is None: return actualCacheVersion, dossiersList = data LOG_MX('__onSyncComplete', actualCacheVersion, len(dossiersList)) if actualCacheVersion != self.__version: self.__cache.clear() self.__version = actualCacheVersion if syncID == self.__syncID: self.__isSynchronizing = False for ownerID, changeTime, dossierCompDescr in dossiersList: self.__cache[DOSSIER_TYPE.VEHICLE, ownerID] = (changeTime, dossierCompDescr) self.__maxChangeTime = max(self.__maxChangeTime, changeTime) if self.__isFirstSync: self.__isFirstSync = False else: events.onDossiersResync() self.__writeCache()
def __onSyncComplete(self, syncID, data): if data is None: return actualCacheVersion, dossiersList = data LOG_MX('__onSyncComplete', actualCacheVersion, len(dossiersList)) if actualCacheVersion != self.__version: self.__cache.clear() self.__version = actualCacheVersion if syncID == self.__syncID: self.__isSynchronizing = False for ownerID, changeTime, dossierCompDescr in dossiersList: self.__cache[DOSSIER_TYPE.VEHICLE, ownerID] = (changeTime, dossierCompDescr) self.__maxChangeTime = max(self.__maxChangeTime, changeTime) if self.__isFirstSync: self.__isFirstSync = False else: events.onDossiersResync() self.__writeCache()