Skip to content

Commit

Permalink
fix operator for sql application name
Browse files Browse the repository at this point in the history
  • Loading branch information
OriHoch committed Oct 30, 2024
1 parent c5faa3b commit 0cec5bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions open_bus_pipelines/operators/cli_bash_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ class CliBashOperator(BashOperator):

def __init__(self, cmd, **kwargs):
assert not kwargs.get('bash_command')
kwargs['bash_command'] = '{print_dag_run}{pip_install_deps}{ENV}{STRIDE_VENV}/bin/{cmd}'.format(
super(CliBashOperator, self).__init__(**kwargs)
self.bash_command = '{print_dag_run}{pip_install_deps}{ENV}{STRIDE_VENV}/bin/{cmd}'.format(
ENV=f'SQLALCHEMY_APPLICATION_NAME="{self.task_id}" SQLALCHEMY_APPLICATION_VERSION="$(cat {STRIDE_VENV}/open_bus_pipelines_commit.txt)" ',
STRIDE_VENV=STRIDE_VENV,
cmd=cmd,
print_dag_run=get_print_dag_run(),
pip_install_deps=get_pip_install_deps()
)
if OPEN_BUS_PIPELINES_ALERT_EMAILS:
kwargs['email'] = OPEN_BUS_PIPELINES_ALERT_EMAILS
super(CliBashOperator, self).__init__(**kwargs)
self.email = OPEN_BUS_PIPELINES_ALERT_EMAILS

0 comments on commit 0cec5bb

Please sign in to comment.