Actually run the damn thing
This commit is contained in:
parent
ed7b167167
commit
da4a2a6e0c
@ -13,17 +13,16 @@ pub mod services;
|
||||
|
||||
/** Perform any init-time operations that require the DB. */
|
||||
pub fn post_init() -> AdHoc {
|
||||
AdHoc::on_ignite("post_init", |rocket| async {
|
||||
AdHoc::on_liftoff("post_init", |rocket| Box::pin(async move {
|
||||
let conn = &Db::fetch(&rocket).unwrap().conn;
|
||||
ensure_vmid_lock(&conn).await.unwrap();
|
||||
|
||||
rocket
|
||||
})
|
||||
ensure_vmid_lock(conn).await.unwrap();
|
||||
}))
|
||||
}
|
||||
|
||||
pub fn init() -> AdHoc {
|
||||
AdHoc::on_ignite("mod(db)", |rocket| async {
|
||||
rocket.attach(db::init())
|
||||
.attach(route::init())
|
||||
.attach(post_init())
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user