mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26:21 +00:00
feat(init::schema) init database schema
This commit is contained in:
6 files changed
+71
-13
No files matched your search
@@ -1,9 +1,10 @@
|
||||
use crate::blog;
|
||||
use crate::scheduler::Scheduler;
|
||||
use sqlx::{Pool, Postgres};
|
||||
|
||||
pub fn start() {
|
||||
pub fn start(db_pool: Pool<Postgres>) {
|
||||
let scheduler = Scheduler::new();
|
||||
let _ = vec![blog::cron::get_tasks()]
|
||||
let _ = vec![blog::cron::get_tasks(db_pool.clone())]
|
||||
.into_iter()
|
||||
.map(|list| scheduler.insert_list(list))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
Reference in new issue
Block a user