feat(flows): 新增流程编辑器基础功能与相关组件
feat(backend): 添加流程模型与服务支持 feat(frontend): 实现流程编辑器UI与交互 feat(assets): 添加流程节点图标资源 feat(plugins): 实现上下文菜单和运行时插件 feat(components): 新增基础节点和侧边栏组件 feat(routes): 添加流程相关路由配置 feat(models): 创建流程和运行日志数据模型 feat(services): 实现流程服务层逻辑 feat(migration): 添加流程相关数据库迁移 feat(config): 更新前端配置支持流程编辑器 feat(utils): 增强axios错误处理和工具函数
This commit is contained in:
@ -7,7 +7,7 @@ pub mod models;
|
||||
pub mod services;
|
||||
pub mod routes;
|
||||
pub mod utils;
|
||||
//pub mod workflow;
|
||||
pub mod flow;
|
||||
|
||||
use axum::Router;
|
||||
use axum::http::{HeaderValue, Method};
|
||||
@ -15,6 +15,16 @@ use tower_http::cors::{CorsLayer, Any, AllowOrigin};
|
||||
use migration::MigratorTrait;
|
||||
use axum::middleware;
|
||||
|
||||
// 自定义日志时间格式:YYYY-MM-DD HH:MM:SS.ssssss(不带 T 和 Z)
|
||||
struct LocalTimeFmt;
|
||||
|
||||
impl tracing_subscriber::fmt::time::FormatTime for LocalTimeFmt {
|
||||
fn format_time(&self, w: &mut tracing_subscriber::fmt::format::Writer) -> std::fmt::Result {
|
||||
let now = chrono::Local::now();
|
||||
w.write_str(&now.format("%Y-%m-%d %H:%M:%S%.6f").to_string())
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
// 增强:支持通过 ENV_FILE 指定要加载的环境文件,并记录实际加载的文件
|
||||
@ -41,9 +51,14 @@ async fn main() -> anyhow::Result<()> {
|
||||
}
|
||||
};
|
||||
|
||||
tracing_subscriber::fmt().with_env_filter(tracing_subscriber::EnvFilter::from_default_env()).init();
|
||||
tracing_subscriber::fmt()
|
||||
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
|
||||
.with_timer(LocalTimeFmt)
|
||||
.init();
|
||||
|
||||
let db = db::init_db().await?;
|
||||
// set global DB for tasks
|
||||
db::set_db(db.clone()).expect("db set failure");
|
||||
|
||||
// initialize Redis connection
|
||||
let redis_pool = redis::init_redis().await?;
|
||||
|
||||
Reference in New Issue
Block a user