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(watcher): improve performance of the Watcher service #1888

Merged

Conversation

olfamizen
Copy link
Contributor

No description provided.

@olfamizen olfamizen self-assigned this Jan 9, 2024
@olfamizen olfamizen force-pushed the ANT-925-Amelioration-de-la-performance-du-watcher branch from e0721bf to e66ed8d Compare January 9, 2024 10:55
Copy link
Contributor

@laurent-laporte-pro laurent-laporte-pro left a comment

Choose a reason for hiding this comment

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

J'ai fais un certain nombre de commentaires concernant le code, il y a des modifications à faire. Pense aussi à utiliser les outils isort, black et mypy pour reformatter et contrôler le code.

Par ailleurs, il faudra ajouter une migration de base de données cas un certains nombre de champs "ForeignKey" n'ont pas de règle de gestion pour la suppression. Il maque des suppression en cascade, du genre :

class StudyAdditionalData(Base):
    ...

    study_id = Column(
        String(36),
        ForeignKey("study.id", ondelete="CASCADE"),  # suppression en cascade
        primary_key=True,
    )

La suppresion en cascade est aussi nécessaire pour :

  • Study.parent_id pour une suppression en cascade des variants.
  • RawStudy.id pour la suppression des RawStudy lorsqu'on supprime un Study.
  • ``VariantStudy.id` pour la même raison.

antarest/study/repository.py Outdated Show resolved Hide resolved
antarest/study/repository.py Outdated Show resolved Hide resolved
antarest/study/repository.py Outdated Show resolved Hide resolved
antarest/study/repository.py Outdated Show resolved Hide resolved
antarest/study/repository.py Outdated Show resolved Hide resolved
antarest/study/repository.py Outdated Show resolved Hide resolved
antarest/study/service.py Outdated Show resolved Hide resolved
antarest/study/service.py Outdated Show resolved Hide resolved
antarest/study/service.py Outdated Show resolved Hide resolved
tests/storage/test_service.py Show resolved Hide resolved
@laurent-laporte-pro laurent-laporte-pro changed the title perf/ANT-925_amelioration_performance_watcher perf(watcher): improve performance of the Watcher service Jan 26, 2024
@olfamizen olfamizen force-pushed the ANT-925-Amelioration-de-la-performance-du-watcher branch 4 times, most recently from 4fe8ae1 to a0ec27f Compare February 12, 2024 17:13
@pull-request-size pull-request-size bot added size/L and removed size/M labels Feb 12, 2024
@olfamizen olfamizen force-pushed the ANT-925-Amelioration-de-la-performance-du-watcher branch from 57e7819 to 4ce89f9 Compare February 13, 2024 15:15
@laurent-laporte-pro laurent-laporte-pro force-pushed the ANT-925-Amelioration-de-la-performance-du-watcher branch from a9ca976 to 876bfde Compare February 14, 2024 14:29
@laurent-laporte-pro
Copy link
Contributor

La validation sera possible après #1934.
L'ID de révision Alembic à utiliser est dae93f1d9110.

@laurent-laporte-pro laurent-laporte-pro marked this pull request as draft February 15, 2024 09:36
@laurent-laporte-pro laurent-laporte-pro marked this pull request as ready for review February 16, 2024 07:33
@laurent-laporte-pro laurent-laporte-pro force-pushed the ANT-925-Amelioration-de-la-performance-du-watcher branch from f544c5a to 7c3c5cd Compare February 16, 2024 07:43
@laurent-laporte-pro laurent-laporte-pro merged commit 5c269c6 into dev Feb 16, 2024
7 checks passed
@laurent-laporte-pro laurent-laporte-pro deleted the ANT-925-Amelioration-de-la-performance-du-watcher branch February 16, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants