Updated command timeout length to 120 seconds for worker and API.
This commit is contained in:
@@ -22,7 +22,10 @@ public static class ServiceCollectionExtensions
|
|||||||
?? throw new InvalidOperationException("Missing ConnectionStrings:AppDb");
|
?? throw new InvalidOperationException("Missing ConnectionStrings:AppDb");
|
||||||
|
|
||||||
services.AddDbContextFactory<AppDbContext>(opt =>
|
services.AddDbContextFactory<AppDbContext>(opt =>
|
||||||
opt.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString))
|
opt.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString), mySqlOptions =>
|
||||||
|
{
|
||||||
|
mySqlOptions.CommandTimeout(120);
|
||||||
|
})
|
||||||
.EnableSensitiveDataLogging(false));
|
.EnableSensitiveDataLogging(false));
|
||||||
|
|
||||||
services.AddControllers();
|
services.AddControllers();
|
||||||
|
|||||||
@@ -59,7 +59,10 @@ builder.Services
|
|||||||
|
|
||||||
builder.Services.AddDbContextFactory<AppDbContext>(optionsBuilder =>
|
builder.Services.AddDbContextFactory<AppDbContext>(optionsBuilder =>
|
||||||
optionsBuilder
|
optionsBuilder
|
||||||
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString))
|
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString), mySqlOptions =>
|
||||||
|
{
|
||||||
|
mySqlOptions.CommandTimeout(120);
|
||||||
|
})
|
||||||
.EnableSensitiveDataLogging(false));
|
.EnableSensitiveDataLogging(false));
|
||||||
|
|
||||||
// Worker services
|
// Worker services
|
||||||
|
|||||||
Reference in New Issue
Block a user