Merge pull request #2504 from alphagov/reduce-number-of-billing-days-to-calculate

Reduce the number of days to recalculate billing.
This commit is contained in:
Rebecca Law
2019-05-17 16:12:07 +01:00
committed by GitHub
2 changed files with 5 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ def create_nightly_billing(day_start=None):
else:
# When calling the task its a string in the format of "YYYY-MM-DD"
day_start = datetime.strptime(day_start, "%Y-%m-%d").date()
for i in range(0, 10):
for i in range(0, 4):
process_day = day_start - timedelta(days=i)
transit_data = fetch_billing_data_for_day(process_day=process_day)