Skip to content
Snippets Groups Projects
Commit f89ee284 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

API: identifiables are no longer returned, but an instance variable

parent 28a20667
No related branches found
No related tags found
No related merge requests found
......@@ -76,6 +76,7 @@ class AbstractCFood(object):
self.crawled_path = crawled_file.path
self.match = type(self).match(crawled_file.path)
self.to_be_updated = db.Container()
self.identifiables = db.Container()
@staticmethod
def get_re():
......@@ -103,7 +104,7 @@ class AbstractCFood(object):
def create_identifiables(self):
"""
must return a Container with the identifiables
should set the instance variable Container with the identifiables
"""
raise NotImplementedError()
......
......@@ -78,16 +78,16 @@ class Crawler(object):
if Cfood.match(crawled_file.path) is not None:
try:
cfood = Cfood(crawled_file, access=self.access)
identifiables = cfood.create_identifiables()
cfood.create_identifiables()
if self.use_cache:
hashes = self.cache.update_ids_from_cache(
identifiables)
cfood.identifiables)
self.find_or_insert_identifiables(identifiables)
self.find_or_insert_identifiables(cfood.identifiables)
if self.use_cache:
self.cache.insert_list(hashes, identifiables)
self.cache.insert_list(hashes, cfood.identifiables)
cfood.update_identifiables()
cfood.push_identifiables_to_CaosDB()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment