'Remove temporary directory and attribute files generated during setup for this job.'

def cleanup_after_job(self, db_session):

    jeha = db_session.query(model.JobExportHistoryArchive).filter_by(job_id=self.job_id).first()
    if jeha:
        for filename in [jeha.history_attrs_filename, jeha.datasets_attrs_filename, jeha.jobs_attrs_filename]:
            try:
                os.remove(filename)
            except Exception as e:
                log.debug(('Failed    to    cleanup    attributes    file    (%s):    %s' % (filename, e)))
        temp_dir = os.path.split(jeha.history_attrs_filename)[0]
        try:
            shutil.rmtree(temp_dir)
        except Exception as e:
            log.debug(('Error    deleting    directory    containing    attribute    files    (%s):    %s' % (temp_dir, e)))
