Skip to content

Commit

Permalink
Merge pull request #108 from zizzic/develop_fix_for_youngho
Browse files Browse the repository at this point in the history
[fix] correct time difference
  • Loading branch information
mediwind authored Feb 26, 2024
2 parents 66f9dc6 + 29b8a8f commit eace001
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions dags/glue/game_ccu.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def upload_rendered_script_to_s3(
default_args={
"owner": "airflow",
"depends_on_past": False,
"start_date": datetime(2024, 2, 22),
"start_date": datetime(2024, 2, 27),
"retries": 3,
"retry_delay": timedelta(minutes=5),
"retry_delay": timedelta(seconds=15),
},
max_active_runs=1,
schedule_interval="5 * * * *",
Expand All @@ -47,10 +47,10 @@ def upload_rendered_script_to_s3(
) as dag:

bucket_name = "de-2-1-bucket"
current_time = "{{ data_interval_end.in_timezone('Asia/Seoul').strftime('%Y-%m-%dT%H:%M:%S+00:00') }}"
year = "{{ data_interval_end.in_timezone('Asia/Seoul').year }}"
month = "{{ data_interval_end.in_timezone('Asia/Seoul').month }}"
day = "{{ data_interval_end.in_timezone('Asia/Seoul').day }}"
current_time = "{{ (data_interval_end - macros.timedelta(hours=1)).in_timezone('Asia/Seoul').strftime('%Y-%m-%dT%H:%M:%S+00:00') }}"
year = "{{ (data_interval_end - macros.timedelta(hours=1)).in_timezone('Asia/Seoul').year }}"
month = "{{ (data_interval_end - macros.timedelta(hours=1)).in_timezone('Asia/Seoul').month }}"
day = "{{ (data_interval_end - macros.timedelta(hours=1)).in_timezone('Asia/Seoul').day }}"
hour = "{{ (data_interval_end - macros.timedelta(hours=1)).in_timezone('Asia/Seoul').hour }}" # before 1 hour

upload_script = PythonOperator(
Expand Down
2 changes: 1 addition & 1 deletion dags/glue/game_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def upload_rendered_script_to_s3(
"depends_on_past": False,
"start_date": datetime(2024, 2, 22),
"retries": 3,
"retry_delay": timedelta(minutes=5),
"retry_delay": timedelta(seconds=15),
},
max_active_runs=1,
schedule_interval="0 1 * * *",
Expand Down
2 changes: 1 addition & 1 deletion dags/glue/game_rating.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def upload_rendered_script_to_s3(
"depends_on_past": False,
"start_date": datetime(2024, 2, 22),
"retries": 3,
"retry_delay": timedelta(minutes=5),
"retry_delay": timedelta(seconds=15),
},
max_active_runs=1,
schedule_interval="0 1 * * *",
Expand Down

0 comments on commit eace001

Please sign in to comment.