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)
  • Loading branch information
APiankouski authored Sep 18, 2024
1 parent 614f643 commit 7e028b2
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 7e028b2

Please sign in to comment.