swh.indexer.journal_client module#

class swh.indexer.journal_client.IndexerJournalClient(indexer, *args, **kwargs)[source]#

Bases: JournalClientBase

indexer: BaseIndexer#
process_one_object(decoded_object, decoded_object_type, raw_message)[source]#

Implementation is in charge of calling the run method of the indexer and trap any error to report it within the error_reporter.

log_error_report(object_d: Dict, object_type: str, msg, exc: Exception, operation: str) None[source]#

Method called when issue must be reported without failing the index process.

This always logs the issue in sentry. This can also optionally logs the issue in another reporter (when said reporter is declared in configuration).

Parameters:
  • object_d – The object dict which created a problem

  • object_type – its associated object_type

  • msg – The raw kafka message read from the topic

  • exc – The exception raised and caught (it contains the id of the object)

  • operation – The operation method called which raised the issue

Returns:

None