添加是否启动定时任务配置
This commit is contained in:
@@ -187,5 +187,6 @@
|
|||||||
"DoMainPc": "http://localhost:3000", // 前端PC外网能访问的地址(域名), 回调的时候拼接接口地址用
|
"DoMainPc": "http://localhost:3000", // 前端PC外网能访问的地址(域名), 回调的时候拼接接口地址用
|
||||||
"DoMainApp": "http://localhost:8081", // 前端App外网能访问的地址(域名), 回调的时候拼接接口地址用
|
"DoMainApp": "http://localhost:8081", // 前端App外网能访问的地址(域名), 回调的时候拼接接口地址用
|
||||||
"AppPushUrl": "https://8e84eea8-6922-4033-8e86-67ad7442e692.bspapp.com/unipush"
|
"AppPushUrl": "https://8e84eea8-6922-4033-8e86-67ad7442e692.bspapp.com/unipush"
|
||||||
}
|
},
|
||||||
|
"IsStartTimeJob": true //是否开启定时任务
|
||||||
}
|
}
|
||||||
@@ -109,6 +109,8 @@ public class Startup : AppStartup
|
|||||||
|
|
||||||
SnowflakeIdHelper.InitYitIdWorker();
|
SnowflakeIdHelper.InitYitIdWorker();
|
||||||
|
|
||||||
serviceProvider.GetRequiredService<ITimeTaskService>().StartTimerJob();
|
bool isStartTimeJob = App.GetConfig<bool>("IsStartTimeJob");
|
||||||
|
if(isStartTimeJob)
|
||||||
|
serviceProvider.GetRequiredService<ITimeTaskService>().StartTimerJob();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user