Closed tkohr closed 4 years ago
Reading
requests-futures
doc, if you call.result()
here you're making it synchronous again.
Ah really !? I didn't get that on the first read. I will get rid of it as google will rarely not respond with a status 200 and the status is not even a confirmation if the hit is valid / counted.
File "/app/thinkhazard/views/report.py", line 264, in report_json
GoogleAnalytics().hit(request.path, "report-division_code-hazard_type")
File "/app/thinkhazard/analytics.py", line 29, in __init__
self.debug = "" if os.environ['INI_FILE'] == "production.ini" else "/debug"
File "/usr/local/lib/python3.8/os.py", line 675, in __getitem__
raise KeyError(key) from None
KeyError: 'INI_FILE'
Travis fail.
Looks like travis doesn't need to be updated if #882 is merged. Maybe @arnaud-morvan can merge it if he's happy with, and you can rebase this one.
PR sends hits to GA to track API usage (when production.ini is used).
A custom report is set up in GA interface to display this data.