|
|
@@ -95,7 +95,7 @@ namespace TVShoppingCallCenter_ZLJ
|
|
95
|
95
|
});
|
|
96
|
96
|
#endregion
|
|
97
|
97
|
#region 配置数据库
|
|
98
|
|
- BaseContext.DB_ConnectionString = Configuration.GetConnectionString("DefaultConnection");
|
|
|
98
|
+ BaseContext.DB_ConnectionString = Configuration.GetConnectionString("MySqlConnection");
|
|
99
|
99
|
BaseMysqlContext.DB_ConnectionString = Configuration.GetConnectionString("MySqlConnection");
|
|
100
|
100
|
#endregion
|
|
101
|
101
|
|
|
|
@@ -146,19 +146,19 @@ namespace TVShoppingCallCenter_ZLJ
|
|
146
|
146
|
services.AddTransient<IBus_SMSTemplateRepository, Bus_SMSTemplateRepository>();
|
|
147
|
147
|
services.AddTransient<ICall_CallRecordsRepository, Call_CallRecordsRepository>();
|
|
148
|
148
|
services.AddTransient<ICDRRepository, CDRRepository>();
|
|
149
|
|
- //services.AddHangfire(x => x.UseStorage(new MySqlStorage(BaseMysqlContext.DB_ConnectionString, new MySqlStorageOptions
|
|
150
|
|
- //{
|
|
151
|
|
- // TransactionIsolationLevel = IsolationLevel.ReadCommitted,
|
|
152
|
|
- // QueuePollInterval = TimeSpan.FromSeconds(15),
|
|
153
|
|
- // JobExpirationCheckInterval = TimeSpan.FromHours(1),
|
|
154
|
|
- // CountersAggregateInterval = TimeSpan.FromMinutes(5),
|
|
155
|
|
- // PrepareSchemaIfNecessary = true,
|
|
156
|
|
- // DashboardJobListLimit = 50000,
|
|
157
|
|
- // TransactionTimeout = TimeSpan.FromMinutes(1),
|
|
158
|
|
- // TablePrefix = "Hangfire"
|
|
159
|
|
- //})));
|
|
|
149
|
+ services.AddHangfire(x => x.UseStorage(new MySqlStorage(BaseMysqlContext.DB_ConnectionString, new MySqlStorageOptions
|
|
|
150
|
+ {
|
|
|
151
|
+ TransactionIsolationLevel = IsolationLevel.ReadCommitted,
|
|
|
152
|
+ QueuePollInterval = TimeSpan.FromSeconds(15),
|
|
|
153
|
+ JobExpirationCheckInterval = TimeSpan.FromHours(1),
|
|
|
154
|
+ CountersAggregateInterval = TimeSpan.FromMinutes(5),
|
|
|
155
|
+ PrepareSchemaIfNecessary = true,
|
|
|
156
|
+ DashboardJobListLimit = 50000,
|
|
|
157
|
+ TransactionTimeout = TimeSpan.FromMinutes(1),
|
|
|
158
|
+ TablePrefix = "Hangfire_"
|
|
|
159
|
+ })));
|
|
160
|
160
|
//GlobalConfiguration.Configuration.UseStorage(
|
|
161
|
|
- // new MySqlStorage(BaseContext.DB_ConnectionString, new MySqlStorageOptions
|
|
|
161
|
+ // new MySqlStorage(BaseMysqlContext.DB_ConnectionString, new MySqlStorageOptions
|
|
162
|
162
|
// {
|
|
163
|
163
|
// TransactionIsolationLevel = IsolationLevel.ReadCommitted,
|
|
164
|
164
|
// QueuePollInterval = TimeSpan.FromSeconds(15),
|
|
|
@@ -167,9 +167,9 @@ namespace TVShoppingCallCenter_ZLJ
|
|
167
|
167
|
// PrepareSchemaIfNecessary = true,
|
|
168
|
168
|
// DashboardJobListLimit = 50000,
|
|
169
|
169
|
// TransactionTimeout = TimeSpan.FromMinutes(1),
|
|
170
|
|
- // TablePrefix = "Hangfire"
|
|
|
170
|
+ // TablePrefix = "Hangfire_"
|
|
171
|
171
|
// }));
|
|
172
|
|
- services.AddHangfire(x => x.UseSqlServerStorage(BaseContext.DB_ConnectionString));
|
|
|
172
|
+ //services.AddHangfire(x => x.UseSqlServerStorage(BaseContext.DB_ConnectionString));
|
|
173
|
173
|
|
|
174
|
174
|
services.AddTransient<ICus_VipInfoRepository, Cus_VipInfoRepository>();
|
|
175
|
175
|
services.AddTransient<ICus_VipLabelInfoRepository, Cus_VipLabelInfoRepository>();
|
|
|
@@ -238,7 +238,7 @@ namespace TVShoppingCallCenter_ZLJ
|
|
238
|
238
|
{
|
|
239
|
239
|
Queues = new[] { "birthday", "minutely" },//队列名称,只能为小写
|
|
240
|
240
|
WorkerCount = Environment.ProcessorCount * 3, //并发任务数
|
|
241
|
|
- ServerName = "hangfire1",//服务器名称
|
|
|
241
|
+ ServerName = "hangfireMysql",//服务器名称
|
|
242
|
242
|
});//启动Hangfire服务 有可选参数
|
|
243
|
243
|
app.UseHangfireDashboard("/hangfire",
|
|
244
|
244
|
new DashboardOptions
|