change default maxRetryCount

This commit is contained in:
2021-05-05 11:05:45 +08:00
parent 05e8ffb23f
commit 2726fcbbd1
2 changed files with 2 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ rssbotLib=rssbot.dll
### maxTTL
可选参数。最大更新间隔。默认值为`1440`。单位为分。如果该值小于`minTTL`,将会自动设为`minTTL`
### maxRetryCount
可选参数。使用Telegram Bot API发送信息发生错误时的最大重试次数。默认值为3
可选参数。使用Telegram Bot API发送信息发生错误时的最大重试次数。默认值为5
### telegramBotApiServer
可选参数。Telegram Bot API Server地址,例如`http://localhost:8081`。设置自建服务器地址后可以启用部分功能。[有关自建Telegram Bot API Server的信息。](https://core.telegram.org/bots/api#using-a-local-bot-api-server)
### downloadMediaFile

View File

@@ -42,7 +42,7 @@ class settings:
self._maxTTL = int(d['maxTTL']) if 'maxTTL' in d and d['maxTTL'].isnumeric(
) and int(d['maxTTL']) >= self._minTTL else max(1440, self._minTTL)
self._maxRetryCount = int(d['maxRetryCount']) if 'maxRetryCount' in d and d['maxRetryCount'].isnumeric(
) and int(d['maxRetryCount']) >= 0 else 3
) and int(d['maxRetryCount']) >= 0 else 5
self._telegramBotApiServer = d['telegramBotApiServer'] if 'telegramBotApiServer' in d else 'https://api.telegram.org'
self._downloadMediaFile = bool(int(
d['downloadMediaFile'])) if 'downloadMediaFile' in d and d['downloadMediaFile'].isnumeric() else False