Пример #1
0
 def do_generate(self, lane):
     feeds = []
     annotator = self.app.manager.annotator(lane)
     title = lane.display_name
     if isinstance(lane, Lane):
         languages = lane.language_key
         lane_name = lane.name
     else:
         languages = None
         lane_name = None
     url = self.app.manager.cdn_url_for(
         "acquisition_groups", languages=languages, lane_name=lane_name
     )
     return AcquisitionFeed.groups(
         self._db, title, url, lane, annotator,
         force_refresh=True
     )
Пример #2
0
 def do_generate(self, lane):
     feeds = []
     annotator = self.app.manager.annotator(lane)
     title = lane.display_name
     
     if isinstance(lane, Lane):
         lane_id = lane.id
     else:
         # Presumably this is the top-level WorkList.
         lane_id = None
     library = lane.get_library(self._db)
     url = self.app.manager.cdn_url_for(
         "acquisition_groups", lane_identifier=lane_id, 
         library_short_name=library.short_name
     )
     yield AcquisitionFeed.groups(
         self._db, title, url, lane, annotator,
         force_refresh=True
     )
Пример #3
0
 def do_generate(self, lane):
     feeds = []
     annotator = self.app.manager.annotator(lane)
     title = lane.display_name
     if isinstance(lane, Lane) and lane.parent:
         languages = lane.language_key
         lane_name = lane.name
     else:
         languages = None
         lane_name = None
     url = self.app.manager.cdn_url_for("acquisition_groups",
                                        languages=languages,
                                        lane_name=lane_name)
     yield AcquisitionFeed.groups(self._db,
                                  title,
                                  url,
                                  lane,
                                  annotator,
                                  force_refresh=True)