mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2024-11-22 16:56:16 +00:00
Revert "Testing putting multiple GetMessages requests into one RpcQuery. References #35."
This reverts commit 0249374384
. Closes #35.
This commit is contained in:
parent
0249374384
commit
4b92d63d2e
@ -33,8 +33,6 @@ import com.github.badoualy.telegram.tl.api.*;
|
|||||||
import com.github.badoualy.telegram.tl.api.upload.TLFile;
|
import com.github.badoualy.telegram.tl.api.upload.TLFile;
|
||||||
import com.github.badoualy.telegram.tl.exception.RpcErrorException;
|
import com.github.badoualy.telegram.tl.exception.RpcErrorException;
|
||||||
import com.github.badoualy.telegram.tl.api.request.TLRequestUploadGetFile;
|
import com.github.badoualy.telegram.tl.api.request.TLRequestUploadGetFile;
|
||||||
import com.github.badoualy.telegram.tl.core.TLMethod;
|
|
||||||
import com.github.badoualy.telegram.tl.api.request.*;
|
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
@ -171,26 +169,6 @@ public class DownloadManager {
|
|||||||
prog.onMessageDownloadStart(ids.size());
|
prog.onMessageDownloadStart(ids.size());
|
||||||
boolean has_seen_flood_wait_message = false;
|
boolean has_seen_flood_wait_message = false;
|
||||||
|
|
||||||
/// Testing
|
|
||||||
List<TLRequestMessagesGetMessages> methods = new LinkedList<>();
|
|
||||||
int a = 0;
|
|
||||||
while(ids.size()>0 && a<5) {
|
|
||||||
a++;
|
|
||||||
TLIntVector vector = new TLIntVector();
|
|
||||||
for (int i=0; i<Config.GET_MESSAGES_BATCH_SIZE; i++) {
|
|
||||||
if (ids.size()==0) break;
|
|
||||||
vector.add(ids.remove(0));
|
|
||||||
}
|
|
||||||
TLRequestMessagesGetMessages method = new TLRequestMessagesGetMessages(vector);
|
|
||||||
methods.add(method);
|
|
||||||
}
|
|
||||||
List<? extends TLObject> responses = client.executeRpcQueries(methods);
|
|
||||||
for(TLObject obj : responses) {
|
|
||||||
System.out.println(obj.getClass().getName());
|
|
||||||
}
|
|
||||||
System.exit(0);
|
|
||||||
/// Testing ends
|
|
||||||
|
|
||||||
logger.debug("Entering download loop");
|
logger.debug("Entering download loop");
|
||||||
while (ids.size()>0) {
|
while (ids.size()>0) {
|
||||||
logger.trace("Loop");
|
logger.trace("Loop");
|
||||||
|
Loading…
Reference in New Issue
Block a user