Skip to content

Commit

Permalink
Revert "Load default Airflow connections on initialization (#182)"
Browse files Browse the repository at this point in the history
This reverts commit f71d082.
  • Loading branch information
mayushko26 authored Nov 27, 2024
1 parent f71d082 commit e1fd3b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
13 changes: 1 addition & 12 deletions images/airflow/2.10.1/python/mwaa/database/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,10 @@ def _migrate_db():
logging.info("The database is now migrated.")


@with_db_lock(1234)
def _create_default_connections():
from airflow.cli.commands import connection_command as airflow_connection_command

try:
args = Namespace(verbose=False)
airflow_connection_command.create_default_connections(args)
logging.info("The default Airflow connections have been created.")
except TimeoutError:
logging.warning("Timed out on initializatin of default Airflow connections.")

def _main():
_verify_environ()
_migrate_db()
_create_default_connections()


if __name__ == "__main__":
_main()
Expand Down
12 changes: 1 addition & 11 deletions images/airflow/2.9.2/python/mwaa/database/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,11 @@ def _migrate_db():
airflow_db_command.migratedb(args)
logging.info("The database is now migrated.")

@with_db_lock(1234)
def _create_default_connections():
from airflow.cli.commands import connection_command as airflow_connection_command

try:
args = Namespace(verbose=False)
airflow_connection_command.create_default_connections(args)
logging.info("The default Airflow connections have been created.")
except TimeoutError:
logging.warning("Timed out on initializatin of default Airflow connections.")

def _main():
_verify_environ()
_migrate_db()
_create_default_connections()


if __name__ == "__main__":
_main()
Expand Down

0 comments on commit e1fd3b6

Please sign in to comment.