feat: add task system

This commit is contained in:
2025-05-09 00:56:26 +08:00
parent 791b75b3af
commit 9d58d961bd
21 changed files with 70 additions and 190 deletions

View File

@@ -1,5 +1,6 @@
use std::{ops::Deref, time::Duration};
use apalis_sql::postgres::PostgresStorage;
use sea_orm::{
ConnectOptions, ConnectionTrait, Database, DatabaseConnection, DbBackend, DbErr, ExecResult,
QueryResult, Statement,
@@ -53,6 +54,10 @@ impl DatabaseService {
if config.auto_migrate {
Migrator::up(&db, None).await?;
{
let pool = db.get_postgres_connection_pool();
PostgresStorage::setup(pool).await?;
}
}
Ok(Self {