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

Perf/clean medias #2550

Merged
merged 6 commits into from
May 22, 2023
Merged

Perf/clean medias #2550

merged 6 commits into from
May 22, 2023

Conversation

mvergez
Copy link
Contributor

@mvergez mvergez commented May 17, 2023

Dans le cadre d'une prestation pour l'Agence Régionale de la Biodiversité en île de France, un problème d'ajout lent de média a été détecté. En effet, comme discuté dans #2436, à chaque insertion ou modification d'un média, une synchronisation des média est faite pour supprimer ou renommer des fichiers plus utilisés.

Cela peut donc engendrer des temps important lors de l'insertion d'un média, par exemple dans occtax.

Cette PR vise à déplacer cette synchronisation dans une tâche Celery beat.

@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Patch coverage: 77.77% and project coverage change: +0.04 🎉

Comparison is base (29494a9) 69.02% compared to head (00079cc) 69.06%.

❗ Current head 00079cc differs from pull request most recent head 5cd4312. Consider uploading reports for the commit 5cd4312 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2550      +/-   ##
===========================================
+ Coverage    69.02%   69.06%   +0.04%     
===========================================
  Files           82       83       +1     
  Lines         7151     7167      +16     
===========================================
+ Hits          4936     4950      +14     
- Misses        2215     2217       +2     
Flag Coverage Δ
pytest 69.06% <77.77%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
backend/geonature/core/gn_commons/medias/routes.py 74.13% <ø> (-0.87%) ⬇️
backend/geonature/core/gn_commons/tasks.py 76.47% <76.47%> (ø)
backend/geonature/utils/config_schema.py 92.42% <100.00%> (+0.02%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@camillemonchicourt
Copy link
Member

OK, je nommerai le paramètre plutôt MEDIA_CLEAN_CRONTAB

@mvergez
Copy link
Contributor Author

mvergez commented May 22, 2023

Merci pour ton retour @camillemonchicourt ! C'est fait dans le commit : 198a731

@camillemonchicourt camillemonchicourt added this to the 2.12 milestone May 22, 2023
@bouttier bouttier force-pushed the perf/clean_medias branch from 5cd4312 to c1ffaf2 Compare May 22, 2023 16:03
@bouttier bouttier merged commit c1ffaf2 into PnX-SI:develop May 22, 2023
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.

3 participants