File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 5
5
from django .db import router
6
6
from django .utils import timezone
7
7
8
- from sentry .models .debugfile import ProjectDebugFile
9
8
from sentry .models .releasefile import ReleaseFile
10
9
from sentry .utils import metrics
11
10
from sentry .utils .db import atomic_transaction
@@ -33,8 +32,8 @@ def renew_releasefiles_by_id(releasefile_ids: list[int]):
33
32
threshold_date = now - timedelta (days = AVAILABLE_FOR_RENEWAL_DAYS )
34
33
35
34
with metrics .timer ("release_files_renewal" ):
36
- with atomic_transaction (using = (router .db_for_write (ProjectDebugFile ),)):
37
- updated_rows_count = ProjectDebugFile .objects .filter (
35
+ with atomic_transaction (using = (router .db_for_write (ReleaseFile ),)):
36
+ updated_rows_count = ReleaseFile .objects .filter (
38
37
id__in = releasefile_ids , date_accessed__lte = threshold_date
39
38
).update (date_accessed = now )
40
39
if updated_rows_count > 0 :
You can’t perform that action at this time.
0 commit comments