fix: ensure backfill_state table is created inside backward_backfill.py initialization
This commit is contained in:
parent
428d4e0d09
commit
7422cd4869
|
|
@ -47,6 +47,17 @@ def init_backfill_states(yesterday_str: str):
|
||||||
with get_db_connection() as conn:
|
with get_db_connection() as conn:
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
|
|
||||||
|
# 테이블 자동 생성
|
||||||
|
cursor.execute("""
|
||||||
|
CREATE TABLE IF NOT EXISTS backfill_state (
|
||||||
|
site_id TEXT PRIMARY KEY,
|
||||||
|
last_backfilled_date TEXT,
|
||||||
|
consecutive_zero_count INTEGER DEFAULT 0,
|
||||||
|
status TEXT DEFAULT 'RUNNING'
|
||||||
|
);
|
||||||
|
""")
|
||||||
|
conn.commit()
|
||||||
|
|
||||||
# NREMS 분할 호기도 식별 가능하게 리스트 빌드
|
# NREMS 분할 호기도 식별 가능하게 리스트 빌드
|
||||||
site_ids = []
|
site_ids = []
|
||||||
for p in plants:
|
for p in plants:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user