fix(config): support float values for CHECK_INTERVAL and API_DELAY
This commit is contained in:
@@ -51,10 +51,10 @@ class Config:
|
||||
start_page = max(int(os.getenv(key="START_PAGE", defualt=1)), 1)
|
||||
|
||||
check_interval = max(
|
||||
int(os.getenv(key="CHECK_INTERVAL", defualt=30)), 0.2
|
||||
float(os.getenv(key="CHECK_INTERVAL", defualt=30)), 0.2
|
||||
) # 300r/60s для GET запросов, 60/300 = минимум
|
||||
api_delay = max(
|
||||
int(os.getenv(key="API_DELAY", defualt=5)), 2
|
||||
float(os.getenv(key="API_DELAY", defualt=5)), 2
|
||||
) # 30r/60s для non-GET запросов, 60/30 = минимум
|
||||
max_retries = int(os.getenv(key="MAX_RETRIES", defualt=3))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user