def _on_warc_created_message(self):
        try:
            log.debug("Warc with id %s", self.message["warc"]["id"])
            # Create warc model object
            warc = Warc.objects.create(
                harvest=Harvest.objects.get(harvest_id=self.message["harvest"]["id"]),
                warc_id=self.message["warc"]["id"],
                path=self.message["warc"]["path"],
                sha1=self.message["warc"]["sha1"],
                bytes=self.message["warc"]["bytes"],
                date_created=iso8601.parse_date(self.message["warc"]["date_created"])
            )
            warc.save()

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