lowered logging level for failed client lookups in dynamo

This commit is contained in:
Victor Ng 2019-02-21 13:16:44 -05:00
Родитель ac4f3a3c26
Коммит 7110da8f85
2 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -39,11 +39,14 @@ class ProfileController:
json_byte_data = zlib.decompress(compressed_bytes)
json_str_data = json_byte_data.decode('utf8')
return json.loads(json_str_data)
except KeyError:
# No client ID found - not really an error
return None
except Exception as e:
# Return None on error. The caller in ProfileFetcher will
# handle error logging
msg = "Error loading client data for {}. Error: {}"
self.logger.error(msg.format(client_id, str(e)))
self.logger.debug(msg.format(client_id, str(e)))
return None
@ -65,7 +68,7 @@ class ProfileFetcher:
profile_data = self._client.get_client_profile(client_id)
if profile_data is None:
self.logger.error("Client profile not found", extra={"client_id": client_id})
self.logger.debug("Client profile not found", extra={"client_id": client_id})
return None
addon_ids = [addon['addon_id']

Просмотреть файл

@ -106,7 +106,7 @@ class RecommendationManager:
client_info = self.profile_fetcher.get(client_id)
if client_info is None:
self.logger.warning(
self.logger.info(
"Defaulting to empty results. No client info fetched from dynamo."
)
return []