This commit is contained in:
@@ -613,17 +613,17 @@ class AnalyticsWorker:
|
||||
# Hole bereits berechnete Daten
|
||||
existing_dates = self.get_existing_dates('analytics_custom')
|
||||
|
||||
# Generiere alle Tage vom ersten Trade bis gestern
|
||||
yesterday = datetime.date.today() - datetime.timedelta(days=1)
|
||||
# Generiere alle Tage vom ersten Trade bis heute
|
||||
today = datetime.date.today()
|
||||
all_dates = []
|
||||
current = first_date
|
||||
while current <= yesterday:
|
||||
while current <= today:
|
||||
all_dates.append(current)
|
||||
current += datetime.timedelta(days=1)
|
||||
|
||||
# Finde fehlende Tage
|
||||
missing_dates = [d for d in all_dates if d not in existing_dates]
|
||||
logger.info(f"Found {len(missing_dates)} missing dates to calculate (from {len(all_dates)} total dates)")
|
||||
logger.info(f"Found {len(missing_dates)} missing dates to calculate (from {len(all_dates)} total dates, first: {first_date}, last: {today})")
|
||||
return sorted(missing_dates)
|
||||
|
||||
def process_missing_dates(self):
|
||||
|
||||
Reference in New Issue
Block a user