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

chore(variants): increase timeout duration for variant generation #2144

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions antarest/study/storage/variantstudy/variant_study_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def get(

Returns: study data formatted in json
"""
self._safe_generation(metadata, timeout=60)
self._safe_generation(metadata, timeout=600)
Copy link
Member

@sylvlecl sylvlecl Sep 18, 2024

Choose a reason for hiding this comment

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

To be honest I am not sure why we have a timeout here.

If the generation task hangs forever we anyway have a problem, so it does not solve much (the task thread will keep busy).
If it's just "long", which may happen, the client will have its own timeout.

Copy link
Member

Choose a reason for hiding this comment

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

Let's keep it for now .... it can have the small benefit of not keeping a fastapi thread busy for too long ...

self.repository.refresh(metadata)
return super().get(
metadata=metadata,
Expand Down Expand Up @@ -939,7 +939,7 @@ def get_study_sim_result(self, study: VariantStudy) -> t.List[StudySimResultDTO]
study: study
Returns: study output data
"""
self._safe_generation(study, timeout=60)
self._safe_generation(study, timeout=600)
return super().get_study_sim_result(study=study)

def set_reference_output(self, metadata: VariantStudy, output_id: str, status: bool) -> None:
Expand Down
Loading