Add management command to find domains impacted by 502 bug

http://manage.dimagi.com/default.asp?126120
oh, yeah this is a good point