def start_file_import()

in gnm_deliverables/models.py [0:0]


    def start_file_import(self, user, commit=True):
        """
        tells VS to start importing the file.
         If no item currently exists, then a placeholder is created and the media imported to that.
         If an item does currently exist, then the media is added as a new version.
        This can raise any subclass of gnmvidispine.VSException
        :param user: username to run the operation as
        :param commit: whether to save the model before returning
        :return:
        """
        if self.created_from_existing_item:
            return
        if self.online_item_id is None:
            current_item = self.create_placeholder(user, commit=False)
        else:
            current_item = self.item(user=user)

        should_we_not_attempt_a_transcode = self.type in [DELIVERABLE_ASSET_TYPE_OTHER_MISCELLANEOUS,
                                                          DELIVERABLE_ASSET_TYPE_OTHER_PAC_FORMS,
                                                          DELIVERABLE_ASSET_TYPE_OTHER_POST_PRODUCTION_SCRIPT,
                                                          DELIVERABLE_ASSET_TYPE_OTHER_SUBTITLE]

        #run_as should be taken care of by the VSItem base class, initated from self.item
        import_job = current_item.import_to_shape(uri="file://" + self.absolute_path.replace(" ","%20"),
                                                  priority="MEDIUM",
                                                  essence=True,
                                                  thumbnails=False,
                                                  noTranscode=should_we_not_attempt_a_transcode,
                                                  jobMetadata={
                                                      "import_source": "pluto-deliverables",
                                                      "project_id": str(self.deliverable.pluto_core_project_id),
                                                      "asset_id": str(self.id)
                                                  })
        self.job_id = import_job.name
        if commit:
            self.save()