Skip to content

Commit

Permalink
Operators: refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnestaP committed Aug 2, 2024
1 parent 0bf939c commit a1d0250
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dags/common/operators/sqlalchemy_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_session(conn_id: str):
def sqlalchemy_task(conn_id: str):
def decorator(func):
@task(executor_config=kubernetes_executor_config)
def wrapper(*args, **kwargs):
def populate_database(*args, **kwargs):
session = get_session(conn_id)
try:
result = func(*args, session=session, **kwargs)
Expand All @@ -26,6 +26,6 @@ def wrapper(*args, **kwargs):
finally:
session.close()

return wrapper
return populate_database

return decorator

0 comments on commit a1d0250

Please sign in to comment.