🔊 fix: Improve history message logging for timeout and limit exceed scenarios
This commit is contained in:
parent
4a907a611d
commit
175a69a9b5
1 changed files with 6 additions and 2 deletions
|
|
@ -124,8 +124,12 @@ public class AutoDownloadVerticle extends AbstractVerticle {
|
||||||
|
|
||||||
private void addHistoryMessage(SettingAutoRecords.Item auto, long currentTimeMillis) {
|
private void addHistoryMessage(SettingAutoRecords.Item auto, long currentTimeMillis) {
|
||||||
log.debug("Start scan history! TelegramId: %d ChatId: %d FileType: %s".formatted(auto.telegramId, auto.chatId, auto.nextFileType));
|
log.debug("Start scan history! TelegramId: %d ChatId: %d FileType: %s".formatted(auto.telegramId, auto.chatId, auto.nextFileType));
|
||||||
if (System.currentTimeMillis() - currentTimeMillis > MAX_HISTORY_SCAN_TIME || isExceedLimit(auto.telegramId)) {
|
if (System.currentTimeMillis() - currentTimeMillis > MAX_HISTORY_SCAN_TIME) {
|
||||||
log.debug("Scan history end! TelegramId: %d ChatId: %d".formatted(auto.telegramId, auto.chatId));
|
log.debug("Scan history timeout! TelegramId: %d ChatId: %d".formatted(auto.telegramId, auto.chatId));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (isExceedLimit(auto.telegramId)) {
|
||||||
|
log.debug("Scan history exceed per telegram account limit! TelegramId: %d ChatId: %d".formatted(auto.telegramId, auto.chatId));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Tuple2<String, List<String>> rule = handleRule(auto);
|
Tuple2<String, List<String>> rule = handleRule(auto);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue