Ejemplo n.º 1
0
 def search(cls, code) -> AV:
     res = spawn_many((Task(source.search_by_code, code)
                       for source in Sources.SearchByCode
                       )).wait_until(lambda x: x.preview_img_url)
     return sum_up(res)
Ejemplo n.º 2
0
 def search_by_code(cls, code):
     res = spawn_many((Task(source.search_by_code, code)
                       for source in cls.sources_by_code
                       )).wait_until(lambda x: x.preview_img_url)
     return sum_up(res)
Ejemplo n.º 3
0
 def get_brief(code):
     return sum_up(spawn_many(
         (Task(source.get_brief, code) for source in Brief.sources)
     ).wait_until(lambda res: res.preview_img_url))