Change metrics increment naming to reflect service instead of geocoder

This commit is contained in:
Mario de Frutos
2016-03-07 16:03:28 +01:00
parent fbd42e3db0
commit 7237e01601
11 changed files with 69 additions and 75 deletions
@@ -18,28 +18,22 @@ class QuotaService:
def check_user_quota(self):
return self._quota_checker.check()
# TODO
# We are going to change this class to be the generic one and
# create specific for routing and geocoding services but because
# this implies change all the extension functions, we are going to
# make the change in a minor release
def increment_success_geocoder_use(self, amount=1):
def increment_success_service_use(self, amount=1):
self._user_service.increment_service_use(
self._user_service_config.service_type, "success_responses",
amount=amount)
def increment_empty_geocoder_use(self, amount=1):
def increment_empty_service_use(self, amount=1):
self._user_service.increment_service_use(
self._user_service_config.service_type, "empty_responses",
amount=amount)
def increment_failed_geocoder_use(self, amount=1):
def increment_failed_service_use(self, amount=1):
self._user_service.increment_service_use(
self._user_service_config.service_type, "fail_responses",
amount=amount)
def increment_total_geocoder_use(self, amount=1):
def increment_total_service_use(self, amount=1):
self._user_service.increment_service_use(
self._user_service_config.service_type, "total_requests",
amount=amount)