Merge pull request #451 from CartoDB/development
Hotfix circular dependencies exceptions
This commit is contained in:
commit
019df2b4e0
@ -3,5 +3,7 @@ from coordinates import Coordinate
|
||||
from polyline import PolyLine
|
||||
from log import Logger, LoggerConfig
|
||||
from rate_limiter import RateLimiter
|
||||
from service_manager import ServiceManager, RateLimitExceeded, QuotaExceededException
|
||||
from service_manager import ServiceManager
|
||||
from legacy_service_manager import LegacyServiceManager
|
||||
from exceptions import QuotaExceededException, RateLimitExceeded
|
||||
from country import country_to_iso3
|
||||
|
@ -1,6 +1,5 @@
|
||||
import json
|
||||
|
||||
|
||||
class TimeoutException(Exception):
|
||||
def __str__(self):
|
||||
return repr('Timeout requesting to server')
|
||||
@ -29,3 +28,11 @@ class WrongParams(Exception):
|
||||
class MalformedResult(Exception):
|
||||
def __str__(self):
|
||||
return repr('Result structure is malformed')
|
||||
|
||||
class RateLimitExceeded(Exception):
|
||||
def __str__(self):
|
||||
return repr('Rate limit exceeded')
|
||||
|
||||
class QuotaExceededException(Exception):
|
||||
def __str__(self):
|
||||
return repr('You have reached the limit of your quota')
|
||||
|
@ -1,20 +1,12 @@
|
||||
from cartodb_services.metrics import QuotaService
|
||||
from cartodb_services.tools import Logger
|
||||
from cartodb_services.tools import RateLimiter
|
||||
from cartodb_services.tools.log import Logger
|
||||
from cartodb_services.tools.rate_limiter import RateLimiter
|
||||
from cartodb_services.tools.exceptions import QuotaExceededException, RateLimitExceeded
|
||||
from cartodb_services.refactor.tools.logger import LoggerConfigBuilder
|
||||
from cartodb_services.refactor.backend.redis_metrics_connection import RedisMetricsConnectionFactory
|
||||
from cartodb_services.config import ServiceConfiguration, RateLimitsConfigBuilder
|
||||
|
||||
|
||||
class RateLimitExceeded(Exception):
|
||||
def __str__(self):
|
||||
return repr('Rate limit exceeded')
|
||||
|
||||
class QuotaExceededException(Exception):
|
||||
def __str__(self):
|
||||
return repr('You have reached the limit of your quota')
|
||||
|
||||
|
||||
class ServiceManagerBase:
|
||||
"""
|
||||
A Service manager collects the configuration needed to use a service,
|
||||
|
Loading…
Reference in New Issue
Block a user