From 6a90f2ef5c57690778628578ceda29ade852c0e2 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Wed, 26 Oct 2016 21:21:26 +0200 Subject: [PATCH] Size of the Batch of IDs for getMessages() is now configurable. Also, upped the limit from 100 to the current 200. --- src/main/java/de/fabianonline/telegram_backup/Config.java | 1 + .../java/de/fabianonline/telegram_backup/DownloadManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/fabianonline/telegram_backup/Config.java b/src/main/java/de/fabianonline/telegram_backup/Config.java index 88ac66a..365e0c8 100644 --- a/src/main/java/de/fabianonline/telegram_backup/Config.java +++ b/src/main/java/de/fabianonline/telegram_backup/Config.java @@ -39,6 +39,7 @@ public class Config { public static int DELAY_AFTER_GET_MESSAGES = 400; 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_DELAY = 1000; diff --git a/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java b/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java index eb4256f..53866c5 100644 --- a/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java +++ b/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java @@ -173,7 +173,7 @@ public class DownloadManager { while (ids.size()>0) { logger.trace("Loop"); TLIntVector vector = new TLIntVector(); - for (int i=0; i<100; i++) { + for (int i=0; i