def _join_transaction(self): if not self._needs_to_join: return dm = CeleryDataManager(self) transaction.get().join(dm) self._needs_to_join = False