Skip to content
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

Utilise la méthode BulkRequest pour l'affichage des statistiques #6135

Merged
merged 2 commits into from
Jun 13, 2021

Conversation

Situphen
Copy link
Member

@Situphen Situphen commented Jun 11, 2021

Utilise la méthode BulkRequest pour l'affichage des statistiques

Copy link
Member

@artragis artragis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super PR, j'ai deux/trois broutilles que tu peux changer.

zds/tutorialv2/views/statistics.py Outdated Show resolved Hide resolved
zds/tutorialv2/views/statistics.py Outdated Show resolved Hide resolved
all_type_referrers = self.get_all_refs(urls, start_date, end_date, "Referrers.getReferrerType")
all_keywords = self.get_all_refs(urls, start_date, end_date, "Referrers.getKeywords")

for index, url in enumerate(urls):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

je l'aurais nommé url_hierarchy_index pour rappeler que le principal besoin c'est les tutos big et moyens

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Qu'est-ce que tu aurais nommé url_hierarchy_index ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

la variable index

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, pour être honnête je pense que ça rendrait le code plus confus qu'autre chose. On a urls qui est une liste de NamedUrl sur laquelle on itère, à chaque itération on note l'index et l'élément en question. Il ne s'agit pas de l'index dans la hiérarchie du contenu (ce qui est comme ça que je comprends url_hierarchy_index).

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 86.689% when pulling a1a339a on Situphen:bulkrequests into e3fde7b on zestedesavoir:dev.

@Situphen Situphen marked this pull request as ready for review June 12, 2021 23:45
@Situphen Situphen requested a review from artragis June 12, 2021 23:47
@Situphen Situphen merged commit 836d6b8 into zestedesavoir:dev Jun 13, 2021
@Situphen Situphen deleted the bulkrequests branch June 13, 2021 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants