fix python 3.8 compat for edoxid calendar sync

apache/airflow:2.7.1 base image ships Python 3.8, which doesn't have
zoneinfo (3.9+) and can't evaluate `X | Y` / list[X] type hints at
runtime (3.10+). Add `from __future__ import annotations` everywhere
and swap zoneinfo -> pytz (already a dependency in this repo).
This commit is contained in:
Power BI Dev
2026-07-27 22:10:10 +07:00
parent 33f4666bad
commit e0a6efd204
6 changed files with 27 additions and 12 deletions
+5 -2
View File
@@ -1,6 +1,9 @@
from __future__ import annotations
import logging
from datetime import datetime, timedelta
from zoneinfo import ZoneInfo
import pytz
from scripts.edoxid_calendar_config import (
get_db_config,
@@ -22,7 +25,7 @@ from scripts.edoxid_calendar_state_store import StateStore
logger = logging.getLogger(__name__)
JAKARTA_TZ = ZoneInfo("Asia/Jakarta")
JAKARTA_TZ = pytz.timezone("Asia/Jakarta")
# Toleransi jendela waktu untuk cek reminder — harus >= interval polling DAG (5 menit)
# supaya tidak ada window yang "kelewat" di antara 2 run.