fix celery task error

api automated testing continues fail :(
setup celery error email handler
fix bugs in test cases