Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/core/lister_base.py
Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | class SWHListerBase(abc.ABC, config.SWHConfig): | ||||
@property | @property | ||||
def CONFIG_BASE_FILENAME(self): # noqa: N802 | def CONFIG_BASE_FILENAME(self): # noqa: N802 | ||||
return 'lister_%s' % self.LISTER_NAME | return 'lister_%s' % self.LISTER_NAME | ||||
@property | @property | ||||
def ADDITIONAL_CONFIG(self): # noqa: N802 | def ADDITIONAL_CONFIG(self): # noqa: N802 | ||||
return { | return { | ||||
'credentials': | 'credentials': ('dict', {}), | ||||
('list[dict]', []), | 'cache_responses': ('bool', False), | ||||
'cache_responses': | 'cache_dir': ('str', '~/.cache/swh/lister/%s' % self.LISTER_NAME), | ||||
('bool', False), | |||||
'cache_dir': | |||||
('str', '~/.cache/swh/lister/%s' % self.LISTER_NAME), | |||||
} | } | ||||
INITIAL_BACKOFF = 10 | INITIAL_BACKOFF = 10 | ||||
MAX_RETRIES = 7 | MAX_RETRIES = 7 | ||||
CONN_SLEEP = 10 | CONN_SLEEP = 10 | ||||
def __init__(self, override_config=None): | def __init__(self, override_config=None): | ||||
self.backoff = self.INITIAL_BACKOFF | self.backoff = self.INITIAL_BACKOFF | ||||
▲ Show 20 Lines • Show All 297 Lines • Show Last 20 Lines |