Projet

Général

Profil

0001-do-not-warn-about-stale-cache-if-not-cache-timeout-i.patch

Frédéric Péters, 25 juin 2019 16:05

Télécharger (1,42 ko)

Voir les différences:

Subject: [PATCH] do not warn about stale cache if not cache timeout is defined
 (#34319)

 mellon/adapters.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
mellon/adapters.py
187 187
                # release thread object
188 188
                idp.pop('METADATA_URL_UPDATE_THREAD', None)
189 189
                # emit an error if cache is too old
190
                stale_timeout = 24 * metadata_cache_time
191
                if last_update and (now - idp['METADATA_URL_LAST_UPDATE']) > stale_timeout:
192
                    logger.error('metadata url %s : not updated since %.1f hours',
193
                                 stale_timeout / 3600.0)
190
                if metadata_cache_time:
191
                    stale_timeout = 24 * metadata_cache_time
192
                    if last_update and (now - idp['METADATA_URL_LAST_UPDATE']) > stale_timeout:
193
                        logger.error('metadata url %s : not updated since %.1f hours',
194
                                     stale_timeout / 3600.0)
194 195

  
195 196
        # we have cache, update in background
196 197
        if last_update and 'METADATA' in idp:
197
-