def delete_job(self, upload_id):

        _debug("S3Importer.delete_job(%s)", upload_id)

        db = current.db

        request = self.request
        resource = request.resource # use self.resource?

        # Get the import job ID
        job_id = self.job_id

        # Delete the import job (if any)
        if job_id:
            result = resource.import_xml(None,
                                         id = None,
                                         tree = None,
                                         job_id = job_id,
                                         delete_job = True)
        # @todo: check result

        # Delete the upload entry
        count = db(self.upload_table.id == upload_id).delete()
        # @todo: check that the record has been deleted

        # Commit the changes
        db.commit()

        result = count

        # Return to the main import screen
        # @todo: check result properly
        if result == False:
            current.response.warning = self.messages.no_job_to_delete
        else:
            current.response.flash = self.messages.job_deleted

        # redirect to the start page (remove all vars)
        self.next = request.url(vars=dict())
        return

    # ========================================================================
    # Utility methods
    # ========================================================================
Checks if another instance isn't equal to this one.
dataset/ETHPy150Open sahana/eden/modules/s3/s3import.py/S3Importer.delete_job--crossover with--dataset/ETHPy150Open sklearn-theano/sklearn-theano/sklearn_theano/externals/google/protobuf/internal/containers.py/BaseContainer.__ne__