swh.indexer.origin_head module

class swh.indexer.origin_head.OriginHeadIndexer(config=None, **kw)[source]

Bases: swh.indexer.indexer.OriginIndexer[Dict]

Origin-level indexer.

This indexer is in charge of looking up the revision that acts as the “head” of an origin.

In git, this is usually the commit pointed to by the ‘master’ branch.

persist_index_computations(results: Any) → Dict[str, int][source]

Do nothing. The indexer’s results are not persistent, they should only be piped to another indexer.

index(id: str, data: None = None, **kwargs) → List[Dict][source]

Index computation for the id and associated raw data.

  • id – identifier or Dict object

  • data – id’s data from storage or objstorage depending on object type


a dict that makes sense for the persist_index_computations() method.

Return type


results: List[TResult]
scheduler: Any
storage: swh.storage.interface.StorageInterface
objstorage: Any
idx_storage: swh.indexer.storage.interface.IndexerStorageInterface