mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2024-11-22 16:56:16 +00:00
Configurable delay between Message downloads.
This commit is contained in:
parent
95e74c58eb
commit
7eed1f6bb1
@ -19,6 +19,7 @@ class Config {
|
|||||||
|
|
||||||
public static final int FILE_DOWNLOAD_BLOCK_SIZE = 10*1024*1024;
|
public static final int FILE_DOWNLOAD_BLOCK_SIZE = 10*1024*1024;
|
||||||
|
|
||||||
|
public static final int DELAY_AFTER_GET_MESSAGES = 200;
|
||||||
public static final int DELAY_AFTER_GET_FILE = 200;
|
public static final int DELAY_AFTER_GET_FILE = 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ class DownloadManager {
|
|||||||
prog.onMessageDownloaded(response.getMessages().size());
|
prog.onMessageDownloaded(response.getMessages().size());
|
||||||
db.save(response.getMessages());
|
db.save(response.getMessages());
|
||||||
try {
|
try {
|
||||||
Thread.sleep(750);
|
Thread.sleep(Config.DELAY_AFTER_GET_MESSAGES);
|
||||||
} catch (InterruptedException e) {}
|
} catch (InterruptedException e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user