Ticket #2682 (closed defect: fixed)
CKAN's internal tracking counts each view twice, needs unit tests
Reported by: | seanh | Owned by: | seanh |
---|---|---|---|
Priority: | awaiting merge | Milestone: | ckan-v1.8 |
Component: | ckan | Keywords: | |
Cc: | Repository: | ckan | |
Theme: | none |
Description
CKAN's internal tracking seems to count each page view twice, the problem appears to be with the SQL in the update_tracking() method in ckan/lib/cli.py.
The internal tracking feature needs some tests, and some of the code could maybe do with some more explanatory comments, e.g. what is the intended difference between count and running_total?
Change History
comment:2 Changed 22 months ago by seanh
Note that this commit fixes the double-counting for page views:
https://github.com/okfn/ckan/commit/5739818a528bb16748f67b6d57a16f575ae78144
but not for resource downloads (which look like they could have the exact same fix) but I'm not particularly happy about the fix because I don't fully understand the SQL.
It still needs unit tests and to be fixed properly, for both pages and resources