mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2024-11-23 01:06:17 +00:00
Experiment: Randomize the number of requested messages.
This commit is contained in:
parent
ec0c05fdb8
commit
e9df4ebdb4
@ -173,7 +173,9 @@ public class DownloadManager {
|
|||||||
while (ids.size()>0) {
|
while (ids.size()>0) {
|
||||||
logger.trace("Loop");
|
logger.trace("Loop");
|
||||||
TLIntVector vector = new TLIntVector();
|
TLIntVector vector = new TLIntVector();
|
||||||
for (int i=0; i<Config.GET_MESSAGES_BATCH_SIZE; i++) {
|
int download_count = Config.GET_MESSAGES_BATCH_SIZE - (int)(Math.random() * Config.GET_MESSAGES_BATCH_SIZE * 0.2);
|
||||||
|
logger.trace("download_count: {}", download_count);
|
||||||
|
for (int i=0; i<download_count; i++) {
|
||||||
if (ids.size()==0) break;
|
if (ids.size()==0) break;
|
||||||
vector.add(ids.remove(0));
|
vector.add(ids.remove(0));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user