Skip to content

Commit

Permalink
don't reverse change order when handling crates.io index updates
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Nov 8, 2023
1 parent 5a86c4a commit b07624a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/build_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,11 @@ impl BuildQueue {
.context("no last_seen_reference set in database")?;
diff.set_last_seen_reference(last_seen_reference)?;

let (mut changes, new_reference) = diff.peek_changes_ordered()?;
let (changes, new_reference) = diff.peek_changes_ordered()?;
let mut crates_added = 0;

debug!("queueing changes from {last_seen_reference} to {new_reference}");

// I believe this will fix ordering of queue if we get more than one crate from changes
changes.reverse();

for change in &changes {
if let Some((ref krate, ..)) = change.crate_deleted() {
match delete_crate(&mut conn, &self.storage, &self.config, krate)
Expand Down

0 comments on commit b07624a

Please sign in to comment.