Final Seeder Time out 10 minutes
This commit is contained in:
parent
e6db756de3
commit
da98513c42
1 changed files with 5 additions and 0 deletions
|
|
@ -29,6 +29,10 @@ public class FinalSeeder : IFinalSeeder, ITransientDependency
|
|||
/// <summary>{sql|postgres} altındaki, migration sonrası da çalıştırılacak script klasörünün adı.</summary>
|
||||
public const string DirectoryName = SeedPathResolver.ExecuteFolder;
|
||||
|
||||
// Buradaki procedure'ler bütün ekranlar üzerinden toplu iş yapar (ör. alan sözlüğü); dolu bir
|
||||
// veritabanında EF'in 30 sn varsayılanını aşar ve migrate sözlüğü boş bırakır.
|
||||
private static readonly TimeSpan CommandTimeout = TimeSpan.FromMinutes(10);
|
||||
|
||||
private static readonly Regex SafeIdentifierRegex =
|
||||
new(@"^[A-Za-z_][A-Za-z0-9_]{0,126}$", RegexOptions.Compiled);
|
||||
|
||||
|
|
@ -93,6 +97,7 @@ public class FinalSeeder : IFinalSeeder, ITransientDependency
|
|||
using var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: false);
|
||||
|
||||
var dbContext = await _dbContextProvider.GetDbContextAsync();
|
||||
dbContext.Database.SetCommandTimeout(CommandTimeout);
|
||||
|
||||
_logger.LogInformation(
|
||||
"Executing procedure {Schema}.{Procedure}",
|
||||
|
|
|
|||
Loading…
Reference in a new issue