-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add download count tracking to asset blobs #1570
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
danlamanna
force-pushed
the
asset-download-counts
branch
from
April 11, 2023 13:31
bb6aedd
to
5f1225d
Compare
jjnesbitt
reviewed
Apr 11, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, just a few comments
danlamanna
force-pushed
the
asset-download-counts
branch
2 times, most recently
from
April 11, 2023 22:04
c6c658c
to
fb4ebf7
Compare
mvandenburgh
approved these changes
Apr 11, 2023
jjnesbitt
approved these changes
Apr 12, 2023
danlamanna
force-pushed
the
asset-download-counts
branch
from
April 12, 2023 17:36
9d0d794
to
fb4ebf7
Compare
danlamanna
force-pushed
the
asset-download-counts
branch
from
May 5, 2023 17:55
fb4ebf7
to
bb772aa
Compare
yarikoptic
reviewed
May 5, 2023
danlamanna
force-pushed
the
asset-download-counts
branch
from
May 15, 2023 17:08
bb772aa
to
f0c64ba
Compare
danlamanna
force-pushed
the
asset-download-counts
branch
from
May 15, 2023 17:08
f0c64ba
to
6841360
Compare
danlamanna
added
patch
Increment the patch version when merged
release
Create a release when this pr is merged
labels
May 15, 2023
🚀 PR was released in |
yarikoptic
reviewed
May 15, 2023
@@ -56,6 +56,7 @@ class BaseAssetBlob(TimeStampedModel): | |||
) | |||
etag = models.CharField(max_length=40, validators=[RegexValidator(f'^{ETAG_REGEX}$')]) | |||
size = models.PositiveBigIntegerField() | |||
download_count = models.PositiveBigIntegerField(default=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where in the API could I see/get those?
This was referenced May 22, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related #1424.
This PR adds S3 server-side log processing to track the number of downloads per asset blob. The plan is to do an initial ingest and then set up a scheduled beat task to run this at some interval. For now, this increments the counters in the database and avoids exposing it in the GUI or aggregating these figures anywhere.