fix GetFilesToProcess in migration
This commit is contained in:
parent
bae96cbdf7
commit
e8ed2bcd89
@ -42,7 +42,8 @@ public class MigrationCreator
|
||||
private string _pathToSave;
|
||||
private string _userName;
|
||||
private string _toRegion;
|
||||
private int _tenant;
|
||||
private int _tenant;
|
||||
private readonly object _locker = new object();
|
||||
private readonly int _limit = 1000;
|
||||
private readonly List<ModuleName> _namesModules = new List<ModuleName>()
|
||||
{
|
||||
@ -290,7 +291,11 @@ public class MigrationCreator
|
||||
.Select(path => new BackupFileInfo(string.Empty, module, path, _tenant))
|
||||
.ToListAsync();
|
||||
|
||||
list.AddRange(files);
|
||||
lock (_locker)
|
||||
{
|
||||
list.AddRange(files);
|
||||
}
|
||||
|
||||
if (files.Any())
|
||||
{
|
||||
Console.WriteLine($"file {dbFile.Id} found");
|
||||
|
Loading…
Reference in New Issue
Block a user