Problem
preprocess_flow.py processes ALL available dates instead of respecting LAST_PREPROCESS_SUCCESS_DATE like other Argentina flows do.
Current behavior (line 188-194):
for date in self.raw_provider.list_available_keys():
if self.processed_provider.exists(date):
continue
await self.process_date(date)
Expected behavior: Filter dates by LAST_PREPROCESS_SUCCESS_DATE first, then check if already processed.
Solution
Add date filtering before the loop:
last_preprocess_date = await variables.Variable.aget(
ArgentinaFlowVariableNames.LAST_PREPROCESS_SUCCESS_DATE,
default=ArgentinaFlowVariableNames.DEFAULT_DATE
)
dates_to_process = [d for d in self.raw_provider.list_available_keys() if d > last_preprocess_date]
This matches the pattern already used in aggregate_products_flow.py and insert_products_flow.py.
Problem
preprocess_flow.pyprocesses ALL available dates instead of respectingLAST_PREPROCESS_SUCCESS_DATElike other Argentina flows do.Current behavior (line 188-194):
Expected behavior: Filter dates by
LAST_PREPROCESS_SUCCESS_DATEfirst, then check if already processed.Solution
Add date filtering before the loop:
This matches the pattern already used in
aggregate_products_flow.pyandinsert_products_flow.py.