-
Notifications
You must be signed in to change notification settings - Fork 4
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
alternate way to count asset downloads #24
Comments
So possible new approaches: The Redis
https://redis.io/commands/INCR
You could try this out locally by running below -- but it won't have persistent storage after restarts (this is enabled on the server)
|
can keys have slashes? like, our key would be {genome}/{asset}. |
Yes.
|
@MichalStolarczyk if you're working on this, make sure to make it optional... I'd rather not introduce this as a requirement since it's sort of a 'nice-to-have' feature. so it shouldn't add any new dependencies, etc. just use it if available |
Also, let me know if you want to go down this particular path. I would just need to make the Redis address available for you from another host.
|
Michal, unfortunately with firewall rules I cannot reach the DCOS redis service from our current swarm, so I am running one with persistent storage on host It also seems wise that if you incorporate Redis-based counters as an option and for portability, it might be best to pass the redis host in as an env variable. Maybe the port as well?
(One quirk to note: By default, all responses are returned as bytes in Python 3 and str in Python 2. Having started working with redis well before Python3, I often forget to recast into str ;-) ) |
raised by @nmagee
The FS used by the container is read-only, so we can't update the config file in order to store download counts:
We need an alternate way to track downloads:
To do:
revert f486b1d
implement new approach
The text was updated successfully, but these errors were encountered: