retryTTL support list

This commit is contained in:
2021-01-19 19:13:04 +08:00
parent 5d11f86036
commit 7c133c9c3d
7 changed files with 59 additions and 12 deletions

View File

@@ -16,6 +16,7 @@
from typing import List
from getopt import getopt
from botOwner import BotOwnerList
from retryTTL import RetryTTLList
class settings:
@@ -49,8 +50,8 @@ class settings:
d['sendFileURLScheme'])) if 'sendFileURLScheme' in d and d['sendFileURLScheme'].isnumeric() else False
self._rssbotLib = d['rssbotLib'] if 'rssbotLib' in d and d['rssbotLib'] != '' else None
self._databaseLocation = d['databaseLocation'] if 'databaseLocation' in d and d['databaseLocation'] != '' else 'data.db'
self._retryTTL = int(d['retryTTL']) if 'retryTTL' in d and d['retryTTL'].isnumeric(
) and int(d['retryTTL']) > 0 else 30
self._retryTTL = RetryTTLList(
d['retryTTL']) if 'retryTTL' in d and d['retryTTL'] != '' else RetryTTLList()
self._botOwnerList = BotOwnerList(
self._main, d['botOwnerList']) if 'botOwnerList' in d and d['botOwnerList'] != '' else BotOwnerList(self._main)