Extension on service for command time out
This commit is contained in:
parent
8313b112fc
commit
1390642e0a
@ -86,21 +86,21 @@ namespace CPRNIMS.WebApi.Common
|
|||||||
options.UseSqlServer(defaultConn, sql =>
|
options.UseSqlServer(defaultConn, sql =>
|
||||||
{
|
{
|
||||||
sql.EnableRetryOnFailure(5, TimeSpan.FromHours(2), null);
|
sql.EnableRetryOnFailure(5, TimeSpan.FromHours(2), null);
|
||||||
sql.CommandTimeout(2);
|
sql.CommandTimeout(20);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
services.AddDbContext<PurchLocalDbContext>(options =>
|
services.AddDbContext<PurchLocalDbContext>(options =>
|
||||||
options.UseSqlServer(localConn, sql =>
|
options.UseSqlServer(localConn, sql =>
|
||||||
{
|
{
|
||||||
sql.EnableRetryOnFailure(5, TimeSpan.FromHours(2), null);
|
sql.EnableRetryOnFailure(5, TimeSpan.FromHours(2), null);
|
||||||
sql.CommandTimeout(2);
|
sql.CommandTimeout(20);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
services.AddDbContext<AuhorizationDbContext>(options =>
|
services.AddDbContext<AuhorizationDbContext>(options =>
|
||||||
options.UseSqlServer(defaultConn, sql =>
|
options.UseSqlServer(defaultConn, sql =>
|
||||||
{
|
{
|
||||||
sql.EnableRetryOnFailure(5, TimeSpan.FromHours(2), null);
|
sql.EnableRetryOnFailure(5, TimeSpan.FromHours(2), null);
|
||||||
sql.CommandTimeout(2);
|
sql.CommandTimeout(20);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user