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] Permettre la désactivation des CRON liés au CPF (PIX-14388). #10245

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

alexandrecoin
Copy link
Contributor

@alexandrecoin alexandrecoin commented Oct 4, 2024

🦄 Problème

On a des CRON annuels sur le CPF qui génère et upload des fichiers.
On ne désire plus utiliser ce CRON.

🤖 Proposition

Suite au tech dev evenementiels, on peut maintenant gérer une propriété isJobEnabled dans l’enregistrement des jobs. Du coup demande vu avec les Team Captains (@bérengère CLAUDEAU @emmanuel FELLER @mathieu Gilet @yoan DE LUCA)

Mettre en place le isJobEnabled (ajout de la propriété dans le code + d’une variable d’env)

🌈 Remarques

  • On a mis à jour la documentation interne
  • On a aussi mis à jour le template de création des RA

💯 Pour tester

Sur la RA:

  • Passer les variables d'environnement PGBOSS_PLANNER_JOB_ENABLED et PGBOSS_EXPORT_SENDER_JOB_ENABLED à true
  • Redemarrer l'API en verifiant que le worker est bien scale a 1
  • Vérifier la présence des cron jobs dans la table pgboss.schedule, c'est a dire CpfExportSenderJob et CpfExportPlannerJob
  • Passer les mêmes variables d'environnement PGBOSS_PLANNER_JOB_ENABLED et PGBOSS_EXPORT_SENDER_JOB_ENABLED à false
  • Redémarrer l'API et le worker
  • Vérifier la disparition des cron jobs dans la table pgboss.schedule, c'est a dire CpfExportSenderJob et CpfExportPlannerJob
  • Enfin : repasser les variables à true, redemarrer, et verifier que les cron jobs sont de retour dans la table pgboss.schedule

@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

@Steph0 Steph0 added the team-captains This is your captain speaking label Oct 4, 2024
@Steph0 Steph0 force-pushed the pix-14388-deactivate-cpf-cron-jobs branch from da95a1d to 0bc322f Compare October 4, 2024 13:07
@Steph0 Steph0 added cross-team Toutes les équipes de dev and removed team-captains This is your captain speaking labels Oct 7, 2024
Copy link
Contributor

@MathieuGilet MathieuGilet left a comment

Choose a reason for hiding this comment

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

Testé et approuvé

@Steph0 Steph0 force-pushed the pix-14388-deactivate-cpf-cron-jobs branch from 0bc322f to e5f4730 Compare October 8, 2024 14:30
@pix-service-auto-merge pix-service-auto-merge merged commit 565c4e3 into dev Oct 8, 2024
11 of 13 checks passed
@pix-service-auto-merge pix-service-auto-merge deleted the pix-14388-deactivate-cpf-cron-jobs branch October 8, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cross-team Toutes les équipes de dev Func Review OK PO validated functionally the PR 🚀 Ready to Merge team-certif Tech Review OK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants