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