0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 17:34:00 +01:00

Only log if we've removed media

This commit is contained in:
Erik Johnston 2017-09-28 16:08:08 +01:00
parent 75e67b9ee4
commit d5694ac5fa

View file

@ -365,7 +365,8 @@ class PreviewUrlResource(Resource):
yield self.store.delete_url_cache(removed_media) yield self.store.delete_url_cache(removed_media)
logger.info("Deleted %d entries from url cache", len(removed_media)) if removed_media:
logger.info("Deleted %d entries from url cache", len(removed_media))
# Now we delete old images associated with the url cache. # Now we delete old images associated with the url cache.
# These may be cached for a bit on the client (i.e., they # These may be cached for a bit on the client (i.e., they
@ -412,7 +413,8 @@ class PreviewUrlResource(Resource):
yield self.store.delete_url_cache_media(removed_media) yield self.store.delete_url_cache_media(removed_media)
logger.info("Deleted %d media from url cache", len(removed_media)) if removed_media:
logger.info("Deleted %d media from url cache", len(removed_media))
def decode_and_calc_og(body, media_uri, request_encoding=None): def decode_and_calc_og(body, media_uri, request_encoding=None):