BasPH commented on a change in pull request #5303: [AIRFLOW-4535] Break jobs.py into multiple files URL: https://github.com/apache/airflow/pull/5303#discussion_r285372713
########## File path: airflow/jobs/base_job.py ########## @@ -0,0 +1,279 @@ +# -*- coding: utf-8 -*- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +import getpass +from time import sleep +from sqlalchemy import (Column, Index, Integer, String, and_, or_) +from sqlalchemy.exc import OperationalError +from sqlalchemy.orm.session import make_transient +from typing import Any + +from airflow import configuration as conf +from airflow import executors, models +from airflow.exceptions import ( + AirflowException, +) +from airflow.stats import Stats +from airflow.utils import helpers, timezone +from airflow.utils.db import create_session, provide_session +from airflow.utils.log.logging_mixin import LoggingMixin +from airflow.utils.net import get_hostname +from airflow.utils.sqlalchemy import UtcDateTime +from airflow.utils.state import State + +Base = models.base.Base # type: Any +ID_LEN = models.base.ID_LEN Review comment: Base & ID_LEN are also exposed in `/airflow/models/__init__.py`, you could simply import as `from airflow.models import Base, ID_LEN`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
