def fetch_items(self, category, **kwargs):
        """Fetch the bugs

        :param category: the category of items to fetch
        :param kwargs: backend arguments

        :returns: a generator of items
        """

        from_date = kwargs['from_date']

        logger.info("Looking for bugs: '%s' updated from '%s'",
                    self.url, str(from_date))

        buglist = [bug for bug in self.__fetch_buglist(from_date)]

        nbugs = 0
        tbugs = len(buglist)

        for i in range(0, tbugs, self.max_bugs):
            chunk = buglist[i:i + self.max_bugs]
            bugs_ids = [b['bug_id'] for b in chunk]

            logger.info("Fetching bugs: %s/%s", i, tbugs)
            bugs = self.__fetch_and_parse_bugs_details(bugs_ids)

            for bug in bugs:
                bug_id = bug['bug_id'][0]['__text__']
                bug['activity'] = self.__fetch_and_parse_bug_activity(bug_id)
                nbugs += 1
                yield bug

        logger.info("Fetch process completed: %s/%s bugs fetched",
                    nbugs, tbugs)
def fetch_items(self, category, **kwargs):
        """Fetch the bugs

        :param category: the category of items to fetch
        :param kwargs: backend arguments

        :returns: a generator of items
        """

        from_date = kwargs['from_date']

        logger.info("Looking for bugs: '%s' updated from '%s'",
                    self.url, str(from_date))

        buglist = [bug for bug in self.__fetch_buglist(from_date)]

        nbugs = 0
        tbugs = len(buglist)

        for i in range(0, tbugs, self.max_bugs):
            chunk = buglist[i:i + self.max_bugs]
            bugs_ids = [b['bug_id'] for b in chunk]

            logger.info("Fetching bugs: %s/%s", i, tbugs)
            bugs = self.__fetch_and_parse_bugs_details(bugs_ids)

            for bug in bugs:
                bug_id = bug['bug_id'][0]['__text__']
                bug['activity'] = self.__fetch_and_parse_bug_activity(bug_id)
                nbugs += 1
                yield bug

        logger.info("Fetch process completed: %s/%s bugs fetched",
                    nbugs, tbugs)
def fetch_items ( self , category , * * kwargs ) : from_date = kwargs [ 'from_date' ] logger . info ( "Looking for bugs: '%s' updated from '%s'" , self . url , str ( from_date ) ) buglist = [ bug for bug in self . __fetch_buglist ( from_date ) ] nbugs = 0 tbugs = len ( buglist ) for i in range ( 0 , tbugs , self . max_bugs ) : chunk = buglist [ i : i + self . max_bugs ] bugs_ids = [ b [ 'bug_id' ] for b in chunk ] logger . info ( "Fetching bugs: %s/%s" , i , tbugs ) bugs = self . __fetch_and_parse_bugs_details ( bugs_ids ) for bug in bugs : bug_id = bug [ 'bug_id' ] [ 0 ] [ '__text__' ] bug [ 'activity' ] = self . __fetch_and_parse_bug_activity ( bug_id ) nbugs += 1 yield bug logger . info ( "Fetch process completed: %s/%s bugs fetched" , nbugs , tbugs )
Fetch the bugs

        :param category: the category of items to fetch
        :param kwargs: backend arguments

        :returns: a generator of items
Fetch the bugs