'Stops an dataset_assoc\'s creating job if all the job\'s other outputs are deleted.'

def stop_creating_job(self, dataset_assoc):

    if ((dataset_assoc.parent_id is None) and (len(dataset_assoc.creating_job_associations) > 0)):
        job = dataset_assoc.creating_job_associations[0].job
        if (not job.finished):
            if job.check_if_output_datasets_deleted():
                job.mark_deleted(self.app.config.track_jobs_in_database)
                self.app.job_manager.job_stop_queue.put(job.id)
                return True
    return False
