startup 改回判斷正式/測試環境
This commit is contained in:
parent
782ddaf512
commit
c51a80b199
@ -96,13 +96,13 @@ namespace SolarPower
|
||||
#region 加入背景執行
|
||||
//services.AddHostedService<OperationScheduleBackgroundService>();
|
||||
//if (envName == "Production")
|
||||
//if (envName != "Production")
|
||||
//{
|
||||
if (envName != "Production")
|
||||
{
|
||||
////添加Quartz服務
|
||||
services.AddSingleton<IJobFactory, SingletonJobFactory>();
|
||||
services.AddSingleton<ISchedulerFactory, StdSchedulerFactory>();
|
||||
////添加Job
|
||||
//#region ©w´Ápµe
|
||||
//#region ©w´Ápµe / ¨C¤é email ³øªíªA°È
|
||||
services.AddSingleton<OperationScheduleJob>();
|
||||
services.AddSingleton(
|
||||
new JobSchedule(jobType: typeof(OperationScheduleJob), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:OperationScheduleJob"))
|
||||
@ -147,7 +147,7 @@ namespace SolarPower
|
||||
//#endregion
|
||||
|
||||
services.AddHostedService<QuartzHostedService>();
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
services.AddApplicationInsightsTelemetry();
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
"Password": "8WMHBEWuT0XoAB4kzduQHA=="
|
||||
},
|
||||
"BackgroundServiceCron": {
|
||||
"CalcPowerStationJob": "0 14 * * * ?",
|
||||
"CalcPowerStationJob": "0 05 * * * ?",
|
||||
"CalcAvgPowerStationJob": "0 12 0 * * ?",
|
||||
"OperationScheduleJob": "0 0 8 * * ?",
|
||||
"CalcInverter15minJob": "0 2/15 * * * ?",
|
||||
|
||||
@ -57,7 +57,7 @@ namespace solarApp
|
||||
|
||||
private void fmArchive_Load(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show(" loading ");
|
||||
// MessageBox.Show(" loading ");
|
||||
#region 電站清單
|
||||
int i = 0;
|
||||
var site_list = stationSvc.get_station_list();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user