Skip to content

Commit

Permalink
EPMRPP-95322 || Job 'CleanLaunchcron' doesn't clean the attachments f…
Browse files Browse the repository at this point in the history
…or 'Regular' launches (#144)

(cherry picked from commit 7e028b2)
  • Loading branch information
APiankouski committed Sep 18, 2024
1 parent dbc7fe6 commit 230167d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ WITH moved_rows AS (
DELETE FROM attachment\s
WHERE project_id = ?\s
AND creation_date <= ?::TIMESTAMP\s
AND launch_id IN (
SELECT id FROM launch WHERE retention_policy='REGULAR'
AND launch_id NOT IN (
SELECT id FROM launch WHERE retention_policy='IMPORTANT'
)\s
RETURNING *
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public CleanLogJob(JdbcTemplate jdbcTemplate, CleanAttachmentJob cleanAttachment
@SchedulerLock(name = "cleanLog", lockAtMostFor = "24h")
public void execute() {
removeLogs();
cleanAttachmentJob.moveAttachments();
}

void removeLogs() {
Expand All @@ -83,6 +82,7 @@ void removeLogs() {
}
}
});
cleanAttachmentJob.moveAttachments();
}

private void deleteLogsFromSearchEngineByLaunchIdsAndProjectId(List<Long> launchIds,
Expand Down

0 comments on commit 230167d

Please sign in to comment.