Skip to content

Commit

Permalink
remove the changes to should_write_to_storage
Browse files Browse the repository at this point in the history
  • Loading branch information
nora-codecov committed Dec 20, 2024
1 parent f99525c commit 96d0b0c
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions shared/django_apps/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,16 +421,8 @@ def should_write_to_storage(self) -> bool:
"""
This only applies to the flare field.
Flare is used to draw static graphs (see GraphHandler view in api) and can be large.
The majority of flare graphs are used in pr comments, so we keep the (maybe large) flare available while
the pull is OPEN. If the pull is not OPEN, we dump the flare to save space. We will recreate it on
the fly if it is needed for a non-OPEN pull (see GraphHandler view in api).
Flare cleanup is handled by FlareCleanupTask in worker.
"""
if self.state != PullStates.OPEN.value:
# while a pull is OPEN, we check whether to write_to_storage
# when a pull is no longer OPEN, we no longer want the flare in storage.
# The nightly cron job cleans up the value in storage (see FlareCleanupTask in worker)
return False
if self.repository is None or self.repository.author is None:
return False
is_codecov_repo = self.repository.author.username == "codecov"
Expand Down

0 comments on commit 96d0b0c

Please sign in to comment.