import fix
This commit is contained in:
@@ -3,10 +3,12 @@ Rate limiter для предотвращения Flood control ошибок в T
|
||||
"""
|
||||
import asyncio
|
||||
import time
|
||||
from typing import Dict, Optional, Any, Callable
|
||||
from dataclasses import dataclass
|
||||
from aiogram.exceptions import TelegramRetryAfter, TelegramAPIError
|
||||
from typing import Any, Callable, Dict, Optional
|
||||
|
||||
from aiogram.exceptions import TelegramAPIError, TelegramRetryAfter
|
||||
from logs.custom_logger import logger
|
||||
|
||||
from .metrics import metrics
|
||||
|
||||
|
||||
@@ -182,7 +184,9 @@ class TelegramRateLimiter:
|
||||
|
||||
|
||||
# Глобальный экземпляр rate limiter
|
||||
from helper_bot.config.rate_limit_config import get_rate_limit_config, RateLimitSettings
|
||||
from helper_bot.config.rate_limit_config import (RateLimitSettings,
|
||||
get_rate_limit_config)
|
||||
|
||||
|
||||
def _create_rate_limit_config(settings: RateLimitSettings) -> RateLimitConfig:
|
||||
"""Создает RateLimitConfig из RateLimitSettings"""
|
||||
|
||||
Reference in New Issue
Block a user