Skip to content

Commit

Permalink
Feature 2321 creating telegram push notifications adding image genera…
Browse files Browse the repository at this point in the history
…tion to airflow fix dag (#41)

* changing import_email_to_s3_and_update_data to weekly

* upgrading airflow version to 2.5.3

* fixing dag generate-infographics-images dag
  • Loading branch information
tkalir authored May 16, 2023
1 parent 80fd4fa commit acc3aed
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions airflow_server/dags/infographics_generate_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@
import pendulum
from anyway_etl_airflow.operators.cli_bash_operator import CliBashOperator


dag_kwargs = dict(
default_args={
'owner': 'airflow',
},
start_date=pendulum.datetime(2023, 4, 1, tz="Asia/Jerusalem")
)


with DAG('generate-infographics-images', **dag_kwargs, params={
"newsflash_id": Param(0, type="integer"),
},) as fill_infographics_cache_dag:
CliBashOperator(cmd='anyway-etl anyway-kubectl-exec python3 \
main.py generate infographics-pictures --id {dag_kwargs[params][newsflash_id]}',
task_id='generate-infographics-images',
with DAG('generate-infographics-images', **dag_kwargs, schedule_interval=None,
description='Generate infographics for newsflash id, must run manually with json, example:'
'{"news_flash_id": "65516"}') as generate_infographics_images_dag:
CliBashOperator(
cmd='anyway-etl anyway-kubectl-exec python3 main.py '
'generate infographics-pictures --id {{ dag_run.conf["news_flash_id"] }}',
task_id='generate-infographics-images'
)

0 comments on commit acc3aed

Please sign in to comment.