Skip to content

Commit

Permalink
fix(rules): ensure archived recordings are sorted by age before pruni…
Browse files Browse the repository at this point in the history
…ng (#358)
  • Loading branch information
andrewazores authored Apr 9, 2024
1 parent fbb3088 commit baec2ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/io/cryostat/rules/ScheduledArchiveJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public void execute(JobExecutionContext ctx) throws JobExecutionException {

@Transactional
void initPreviousRecordings(Target target, Rule rule, Queue<String> previousRecordings) {
recordingHelper.listArchivedRecordingObjects().parallelStream()
recordingHelper.listArchivedRecordingObjects().stream()
.sorted((a, b) -> a.lastModified().compareTo(b.lastModified()))
.forEach(
item -> {
String path = item.key().strip();
Expand Down

0 comments on commit baec2ec

Please sign in to comment.