On 05/24/2013 11:10 AM, Jason L Tibbitts III wrote:
I maintain the code that spits out the review status reports at http://fedoraproject.org/PackageReviewStatus/
In order to generate these reports, I run a few queries to get the list of tickets in the Package Review component and process them a bit. One thing I need to know is whether any tickets in the Blocked By field are still open, so I make a list of them and pass them to getbugssimple(). Unfortunately with the new bugzilla instance currently running, doing this for just 500 tickets takes so long that everything aborts with proxy errors, so I have to split the list and make multiple queries.
Is there any better way to do this? I know bugzilla needs to know this often, in order to strike through ticket dependencies which have been closed. Is there any way to simply get the status of dependencies out of the result of a query without doing a separate lookup?
You will still have the query them separately, but you can do it in such a way that it should return minimal info and be much quicker. something like (untested):
bugs = bz.query(bz.build_query(bug_id=[list, of, 500, bug_ids, ...], include_fields=["status"])
Will return a list of bug objects that are only filled with bug_id and status values.
You could also do build_query(..., status=["NEW", "ASSIGNED", ...]) and it will return only the bugs in those states, which will speed it up.
- Cole