Skip to content

Commit

Permalink
stop hitting sentry rate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed Feb 15, 2021
1 parent bf81c2f commit 7dc6188
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions share/search/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def on_message(self, body, message):

message_queue = self.__incoming_message_queues.get(wrapped_message.message_type)
if message_queue is None:
logger.warn('%r: unknown message type "%s"', self, wrapped_message.message_type)
logger.warning('%r: unknown message type "%s"', self, wrapped_message.message_type)
raise DaemonMessageError(f'Received message with unexpected type "{wrapped_message.message_type}" (message: {message})')

message_queue.put(wrapped_message)
Expand Down Expand Up @@ -236,12 +236,10 @@ def iterate_once(self, stop_event):

if messages_by_id:
# worth noting but not stopping
client.captureMessage(
'IncomingMessageLoop: action generator skipped some target_ids!',
data={
'target_id_chunk': target_id_chunk,
'leftover_messages_by_id': messages_by_id,
},
logger.warning(
'IncomingMessageLoop: action generator skipped some target_ids!\ntarget_id_chunk: %s\nleftover_messages_by_id: %s',
target_id_chunk,
messages_by_id,
)

logger.info('%sPrepared %d docs to be indexed in %.02fs', self.log_prefix, success_count, time.time() - start)
Expand Down

0 comments on commit 7dc6188

Please sign in to comment.