Skip to content

Commit

Permalink
style(storage): reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
maugde committed Oct 8, 2024
1 parent 79398ea commit 634def3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions antarest/study/storage/auto_archive_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,14 @@ def __init__(self, study_service: StudyService, config: Config):

def _try_archive_studies(self) -> None:
"""
Archive old studies
Clear old variant snapshots
Archive old studies
Clear old variant snapshots
"""
old_date = datetime.datetime.utcnow() - datetime.timedelta(days=self.config.storage.auto_archive_threshold_days)
with db():
# in this part full `Read` rights over studies are granted to this function
studies: t.Sequence[Study] = self.study_service.repository.get_all(
study_filter=StudyFilter(
managed=True,
access_permissions=AccessPermissions(is_admin=True))
study_filter=StudyFilter(managed=True, access_permissions=AccessPermissions(is_admin=True))
)
# list of study IDs and boolean indicating if it's a raw study (True) or a variant (False)
study_ids_to_archive = [
Expand Down

0 comments on commit 634def3

Please sign in to comment.