Skip to content

Commit

Permalink
Add check for ANSIBLE_COLLECT_DOWNLOAD_COUNT setting (#1849)
Browse files Browse the repository at this point in the history
* Add check for ANSIBLE_COLLECT_DOWNLOAD_COUNT
No-Issue

* Default to false
No-Issue
  • Loading branch information
bmclaughlin authored Aug 28, 2023
1 parent b5480f4 commit 122b9bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions galaxy_ng/app/api/v3/viewsets/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ def get(self, request, *args, **kwargs):
request, filename, distro_base_path
)

if settings.get("ANSIBLE_COLLECT_DOWNLOAD_COUNT", False):
pulp_ansible_views.CollectionArtifactDownloadView.count_download(filename)

if settings.GALAXY_DEPLOYMENT_MODE == DeploymentMode.INSIGHTS.value:
url = 'http://{host}:{port}/{prefix}/{distro_base_path}/{filename}'.format(
host=settings.X_PULP_CONTENT_HOST,
Expand Down

0 comments on commit 122b9bd

Please sign in to comment.