Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/language.py
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | ADDITIONAL_CONFIG = { | ||||
'configuration': { | 'configuration': { | ||||
'type': 'library', | 'type': 'library', | ||||
'debian-package': 'python3-pygments', | 'debian-package': 'python3-pygments', | ||||
'max_content_size': 10240, | 'max_content_size': 10240, | ||||
}, | }, | ||||
}), | }), | ||||
} | } | ||||
def prepare(self): | @property | ||||
super().prepare() | def max_content_size(self): | ||||
c = self.config | return self.tool['tool_configuration']['max_content_size'] | ||||
self.max_content_size = c['tools']['configuration']['max_content_size'] | |||||
self.tool = self.tools[0] | |||||
def filter(self, ids): | def filter(self, ids): | ||||
"""Filter out known sha1s and return only missing ones. | """Filter out known sha1s and return only missing ones. | ||||
""" | """ | ||||
yield from self.idx_storage.content_language_missing(( | yield from self.idx_storage.content_language_missing(( | ||||
{ | { | ||||
'id': sha1, | 'id': sha1, | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |