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

Tech: migration de commandes vers l'utilisation de logging #5505

Merged
merged 5 commits into from
Feb 3, 2025

Conversation

xavfernandez
Copy link
Contributor

🤔 Pourquoi ?

Car ces commandes sont lancées par des crons et notre logging permet de facilement regrouper les logs d'une même commande.

🍰 Comment ?

Décrivez en quelques mots la solution retenue et mise en oeuvre, les difficultés ou problèmes rencontrés. Attirez l'attention sur les décisions d'architecture ou de conception importantes.

🚨 À vérifier

  • Mettre à jour le CHANGELOG_breaking_changes.md ?
  • Ajouter l'étiquette « Bug » ?

🏝️ Comment tester ?

Les instructions pour reproduire le problème, les profils de test, le parcours spécifique à utiliser, etc. Si vous disposez d'une recette jetable, mettre l'URL pour tester dans cette partie.

💻 Captures d'écran

@xavfernandez xavfernandez added the no-changelog Ne doit pas figurer dans le journal des changements. label Jan 30, 2025
@xavfernandez xavfernandez requested a review from rsebille January 30, 2025 15:50
@xavfernandez xavfernandez self-assigned this Jan 30, 2025
Copy link
Contributor

@tonial tonial left a comment

Choose a reason for hiding this comment

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

👍

Ne touche pas aux commandes de GPS, je vais en supprimer 2 très bientôt

approval = ApprovalFactory()

with assertNumQueries(1): # Select the job seekers
management.call_command("populate_metabase_emplois", mode="data_inconsistencies")

stdout, _ = capsys.readouterr()
Copy link
Contributor

Choose a reason for hiding this comment

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

je découvre qu'on a donc 2 manière d'appeler une management command en tests en récupérant stderr :D

Copy link
Contributor

@tonial tonial left a comment

Choose a reason for hiding this comment

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

C'est mieux quand je sélectionne "approve"

@xavfernandez xavfernandez added this pull request to the merge queue Feb 3, 2025
Merged via the queue into master with commit 5824334 Feb 3, 2025
10 checks passed
@xavfernandez xavfernandez deleted the xfernandez/logging4ever branch February 3, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Ne doit pas figurer dans le journal des changements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants