1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2024-11-23 01:06:17 +00:00

Size of the Batch of IDs for getMessages() is now configurable. Also, upped the limit from 100 to the current 200.

This commit is contained in:
Fabian Schlenz 2016-10-26 21:21:26 +02:00
parent 3d213e9780
commit 6a90f2ef5c
2 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ public class Config {
public static int DELAY_AFTER_GET_MESSAGES = 400; public static int DELAY_AFTER_GET_MESSAGES = 400;
public static int DELAY_AFTER_GET_FILE = 100; public static int DELAY_AFTER_GET_FILE = 100;
public static int GET_MESSAGES_BATCH_SIZE = 200;
public static int RENAMING_MAX_TRIES = 5; public static int RENAMING_MAX_TRIES = 5;
public static int RENAMING_DELAY = 1000; public static int RENAMING_DELAY = 1000;

View File

@ -173,7 +173,7 @@ 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<100; i++) { for (int i=0; i<Config.GET_MESSAGES_BATCH_SIZE; i++) {
if (ids.size()==0) break; if (ids.size()==0) break;
vector.add(ids.remove(0)); vector.add(ids.remove(0));
} }