def find_job_id_by_name(self, job_name: str) -> Optional[int]:
    '\n        Finds job id by its name. If there are multiple jobs with the same name, raises AirflowException.\n\n        :param job_name: The name of the job to look up.\n        :return: The job_id as an int or None if no job was found.\n        '
    all_jobs = self.list_jobs()
    matching_jobs = [j for j in all_jobs if (j['settings']['name'] == job_name)]
    if (len(matching_jobs) > 1):
        raise AirflowException(f'There are more than one job with name {job_name}. Please delete duplicated jobs first')
    if (not matching_jobs):
        return None
    else:
        return matching_jobs[0]['job_id']
Finds job id by its name. If there are multiple jobs with the same name, raises AirflowException.

:param job_name: The name of the job to look up.
:return: The job_id as an int or None if no job was found.
def find_job_id_by_name(self, job_name: str) -> Optional[int]:
    '\n        Finds job id by its name. If there are multiple jobs with the same name, raises AirflowException.\n\n        :param job_name: The name of the job to look up.\n        :return: The job_id as an int or None if no job was found.\n        '
    all_jobs = self.list_jobs()
    matching_jobs = [j for j in all_jobs if (j['settings']['name'] == job_name)]
    if (len(matching_jobs) > 1):
        raise AirflowException(f'There are more than one job with name {job_name}. Please delete duplicated jobs first')
    if (not matching_jobs):
        return None
    else:
        return matching_jobs[0]['job_id']