def _on_export_status_message(self):
        try:
            log.debug("Updating export with id %s", self.message["id"])
            # Retrieve export model object
            export = Export.objects.get(export_id=self.message["id"])

            # And update export model object
            export.status = self.message["status"]
            export.infos = self.message.get("infos", [])
            export.warnings = self.message.get("warnings", [])
            export.errors = self.message.get("errors", [])
            export.date_started = iso8601.parse_date(self.message["date_started"])
            if "date_ended" in self.message:
                export.date_ended = iso8601.parse_date(self.message["date_ended"])
            export.save()

        except __HOLE__:
            log.error("Export model object not found for export status message: %s",
                      json.dumps(self.message, indent=4))
dataset/ETHPy150Open gwu-libraries/sfm-ui/sfm/message_consumer/sfm_ui_consumer.py/SfmUiConsumer._on_export_status_message