We found that the reporting task failed twice because of integrity constraints.

This was because the rate_multiplier was being added as 1 and 1.0 which was not resolving to the same.
This updates the table to use Integrer.
Also changed the logging for the task.
This commit is contained in:
Rebecca Law
2018-05-10 15:35:58 +01:00
parent d52e65d89a
commit 8028f6cc28
4 changed files with 7 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
from datetime import datetime, timedelta
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from app import notify_celery
@@ -24,3 +25,5 @@ def create_nightly_billing(day_start=None):
for data in transit_data:
update_fact_billing(data, process_day)
current_app.logger.info("create-nightly-billing task complete. {} rows updated".format(len(transit_data)))