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");
|
||||
|
||||
services.AddDbContextFactory<AppDbContext>(opt =>
|
||||
opt.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString))
|
||||
opt.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString), mySqlOptions =>
|
||||
{
|
||||
mySqlOptions.CommandTimeout(120);
|
||||
})
|
||||
.EnableSensitiveDataLogging(false));
|
||||
|
||||
services.AddControllers();
|
||||
|
||||
@@ -59,7 +59,10 @@ builder.Services
|
||||
|
||||
builder.Services.AddDbContextFactory<AppDbContext>(optionsBuilder =>
|
||||
optionsBuilder
|
||||
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString))
|
||||
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString), mySqlOptions =>
|
||||
{
|
||||
mySqlOptions.CommandTimeout(120);
|
||||
})
|
||||
.EnableSensitiveDataLogging(false));
|
||||
|
||||
// Worker services
|
||||
|
||||
Reference in New Issue
Block a user