-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
double tracking #50
Comments
Off the top of my head no, but I'll take a quick gander and see if anything jumps out at me. Thanks for reporting it! |
Before I look, do you mind providing the flask version and the backends you've configured? |
I'm using mongoengine for storage (which I wrote for this repo, so it could easily be a bug of mine.)
I've been observing it for a while on my various docker sites. An additional observation: When ever an URL is "corrected" internally by Flask, instead of double-counting the visit, one count is applied to the original query and one count to the internal fix. For example, if a page is at It's almost like the wrapper is being applied prior to and after the view function. Speaking of, I'm running with
"psTrackUsage" is a class I wrote. Removing it doesn't fix the problem. If nothing jumps out, I'll start digging into this. |
I haven't been able to reproduce the issue with other storage backends. I tried Firefox and wget, same version of Flask and Flask-Track-Usage. I also upped to the latest release of Flask and couldn't reproduce it. Did you try dropping |
I also notice this "double" behavior. Looking at the server log (below), there is an "OPTIONS" request before each of my REST request, which seems to be the preflight triggered by my Content-Type of
|
I've not been able to hunt down the exact reason, but it appears that I'm getting "double" entries for every web query. Even using command-line
wget
on a specific page, it showing two entries in the tracking table and two calls into the library: one "extremely short" one. Usually with a speed of 0.04s or less. And one entry that is more representative of the actual time to download the page. This might be a quirk of Flask, but it is inflating the numbers.Any ideas what might be causing this? Is the same procedure being called before and after the request?
The text was updated successfully, but these errors were encountered: