Celery tasks: protect the task body with a transaction.atomic(), to try to avoid some celery crashes when PG connection is in failed state due to errors in tasks.
quick fix for a bad crash.