Skip to content

Commit

Permalink
admin/enqueue_job: Add support for `crates-admin enqueue-job sync_adm…
Browse files Browse the repository at this point in the history
…ins`
  • Loading branch information
Turbo87 committed Jan 3, 2024
1 parent 85a9829 commit 5ea074d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/admin/enqueue_job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub enum Command {
#[arg()]
name: String,
},
SyncAdmins,
}

pub fn run(command: Command) -> Result<()> {
Expand Down Expand Up @@ -58,6 +59,9 @@ pub fn run(command: Command) -> Result<()> {
} => {
jobs::DumpDb::new(database_url.expose_secret(), target_name).enqueue(conn)?;
}
Command::SyncAdmins => {
jobs::SyncAdmins.enqueue(conn)?;
}
Command::DailyDbMaintenance => {
jobs::DailyDbMaintenance.enqueue(conn)?;
}
Expand Down

0 comments on commit 5ea074d

Please sign in to comment.