feat:生成环境才启用定时任务
This commit is contained in:
parent
7694899ac1
commit
9ab3a57b08
@ -121,8 +121,11 @@ app.UseAuthorization();
|
||||
|
||||
//开启缓存
|
||||
app.UseResponseCaching();
|
||||
//恢复/启动任务
|
||||
app.UseAddTaskSchedulers();
|
||||
if (builder.Environment.IsProduction())
|
||||
{
|
||||
//恢复/启动任务
|
||||
app.UseAddTaskSchedulers();
|
||||
}
|
||||
//使用swagger
|
||||
app.UseSwagger();
|
||||
//启用客户端IP限制速率
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user