mirror of
https://github.com/g3rv4/GetMoarFediverse.git
synced 2024-11-21 23:23:09 +01:00
Make the number of lines to store dynamic (#40)
This commit is contained in:
parent
d9faf231a0
commit
fbd47ae7cd
@ -154,10 +154,12 @@ foreach (var statusLink in statusesToLoad)
|
||||
}
|
||||
}
|
||||
|
||||
if (importedList.Count > 5000)
|
||||
var maxFileLines = sitesTags.Count * 40;
|
||||
if (importedList.Count > maxFileLines)
|
||||
{
|
||||
Console.WriteLine($"Keeping the last {maxFileLines} on the status file");
|
||||
importedList = importedList
|
||||
.Skip(importedList.Count - 5000)
|
||||
.Skip(importedList.Count - maxFileLines)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user