Skip to content

Commit

Permalink
admin/yank_version: Enqueue UpdateDefaultVersion job
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Apr 25, 2024
1 parent d39543a commit fef072e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/admin/yank_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use crate::db;
use crate::models::{Crate, Version};
use crate::schema::versions;
use crate::worker::jobs;
use crate::worker::jobs::UpdateDefaultVersion;
use crates_io_worker::BackgroundJob;
use diesel::prelude::*;

#[derive(clap::Parser, Debug)]
Expand Down Expand Up @@ -59,5 +61,7 @@ fn yank(opts: Opts, conn: &mut PgConnection) -> anyhow::Result<()> {

jobs::enqueue_sync_to_index(&krate.name, conn)?;

UpdateDefaultVersion::new(krate.id).enqueue(conn)?;

Ok(())
}

0 comments on commit fef072e

Please sign in to comment.