feat(audit & reports): stabilize live presence, day intervals and reports logic before topics feature
This commit is contained in:
@@ -265,7 +265,7 @@ def run_export(input_date: str | None = None, input_time: str | None = None, sav
|
||||
log(f"--- Обработка периода: {period_label} ({processing_date_str}) --- [Срез: {snapshot_time}]")
|
||||
|
||||
sql_query = SQL_QUERY_TEMPLATE.format(
|
||||
target_date=processing_date.strftime("%Y-%m-%d"),
|
||||
target_date_dmy=processing_date.strftime("%d.%m.%Y"),
|
||||
end_datetime_sql=end_datetime_sql,
|
||||
turnstile_filter_sql=turnstile_filter_sql,
|
||||
fligel_filter_sql=fligel_filter_sql
|
||||
@@ -289,9 +289,12 @@ def run_export(input_date: str | None = None, input_time: str | None = None, sav
|
||||
|
||||
save_scud_to_db(df, processing_date_str, snapshot_time=snapshot_time, is_yesterday=is_final)
|
||||
|
||||
# ⭐️ [ANCHOR: RAW_EVENTS_QUERY_FORMATTING]
|
||||
raw_sql = SQL_RAW_EVENTS_QUERY.format(
|
||||
target_date=processing_date.strftime("%Y-%m-%d"),
|
||||
end_datetime_sql=end_datetime_sql
|
||||
target_date_dmy=processing_date.strftime("%d.%m.%Y"),
|
||||
end_datetime_sql=end_datetime_sql,
|
||||
turnstile_filter_sql=turnstile_filter_sql,
|
||||
fligel_filter_sql=fligel_filter_sql
|
||||
)
|
||||
df_raw = pd.read_sql(raw_sql, connection)
|
||||
if len(df_raw) > 0:
|
||||
|
||||
Reference in New Issue
Block a user