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

[BO - Esabora] Taguer les dossiers comme synchronisés uniquement en cas de succès #2278

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

sfinx13
Copy link
Collaborator

@sfinx13 sfinx13 commented Feb 21, 2024

Ticket

#2277

Description

L'envoi de dossier se fait de manière asynchrone, il est donc pas pertinent de le tagger synchronisé au moment du dispatching il faut plutôt le faire quand tout s'est bien passé afin d'éviter des messages comme
Le dossier n'a pas été trouvé lors de la synchronisation

Ainsi on pourra trouver des dossiers affectés mais non synchronisé à envoyer d'un territoire en exécutant la commande

php bin/console app:push-esabora-dossier schs --zip=69

Changements apportés

  • Déplacement de la logique dans une méthode
  • Appel de la méthode de synchronisation dans chaque handler

Pré-requis

make worker-start
make mock-start

Tests

  • Choisissez un signalement du 13 et affecter un partenaire Partenaire 13-06 ESABORA ARS
    et Partenaire 13-05 ESABORA SCHS
  • Choississer un signalement du 62 et affecter le partenaire Partenaire 62-01

Vérifier que vos affectations sont bien tagué comme synchronisé

SELECT * FROM `affectation` WHERE is_synchronized = 1;

Que les événements esabora s'affiche toujours bien dans le tableau de bord

 make clear-pool pool="dashboard.cache"

Que l'evenement oilhi est bien enregistré dans la table job_event

SELECT * FROM `job_event` where service like 'oilhi';

@@ -181,13 +181,6 @@ affectations:
answered_by: "admin-01@histologe.fr"
affected_by: "admin-01@histologe.fr"
territory: "Pas-de-Calais"
-
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

en double

{
return AbstractEsaboraService::ACTION_PUSH_DOSSIER_PERSONNE === $this->action
&& JobEvent::STATUS_SUCCESS === $this->status;
}
Copy link
Collaborator Author

@sfinx13 sfinx13 Feb 21, 2024

Choose a reason for hiding this comment

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

Pour rappel un envoi de dossier SISH c'est 3 appels de WS dans cet ordre la

  1. adresse
  2. signalement
  3. personne

Donc si le service personne répond OK (c'est que signalement et adresses ont répondu OK également) alors le dossier est complet et doit être tagué comme synchronisé

Copy link
Collaborator

Choose a reason for hiding this comment

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

génial

Copy link

sonarcloud bot commented Feb 21, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
16.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Copy link
Collaborator

@emilschn emilschn left a comment

Choose a reason for hiding this comment

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

OK lecture et tests

Copy link
Collaborator

@hmeneuvrier hmeneuvrier left a comment

Choose a reason for hiding this comment

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

Relecture et test OK

@hmeneuvrier hmeneuvrier merged commit 0ac0dbc into develop Feb 22, 2024
2 of 3 checks passed
@hmeneuvrier hmeneuvrier deleted the feature/2277-tag-sync-dossier-succeed branch March 5, 2024 14:46
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

3 participants