bug 916229 - moving the querying into Celery task