swh.indexer.origin_head module

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

Bases: swh.indexer.indexer.OriginIndexer

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.

USE_TOOLS = False
persist_index_computations(results: Any, policy_update: str) → Dict[str, int][source]

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

index(origin_url)[source]

Index computation for the id and associated raw data.

Parameters
  • id – identifier

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

Returns

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

Return type

dict

results
scheduler