On 2010-09-06 04:52:23 PM, Matt_Domsch(a)Dell.com wrote:
Currently this query takes several minutes. HAProxy (or something in
the proxy series) times out the request, and returns a 500 to the client.
https://admin.fedoraproject.org/accounts/group/dump/
Any chance that could be optimized? FWIW, I use this query in my ftbfs script to convert
package owner names to email addresses, so I can send the FTBFS report to the owner's
emails directly (on bcc).
I know that Mike and Toshio are working on a fix to
/group/dump, but I
just wanted to mention our JSON interface, which currently doesn't
suffer from the same problem. Would this code work for you?
--
from fedora.client.fas2 import AccountSystem
...
fas = AccountSystem(base_url=BASE_URL, username=USERNAME, password=PASSWORD)
constraints = { 'group': 'packager', 'role_status':
'approved' }
columns = ['username', 'email']
results = fas.people_query(constraints=constraints, columns=columns)
emails = dict((row['username'], row['email']) for row in results)
--
Thanks,
Ricky