Remove the class Service in favor of service_type ENUM #302

This commit is contained in:
Rafa de la Torre
2016-11-10 19:21:29 +01:00
parent 429a71ef37
commit 3fa686ec65
2 changed files with 8 additions and 9 deletions

View File

@@ -1,3 +1,11 @@
CREATE TYPE cdb_dataservices_server.service_type AS ENUM (
'isolines',
'hires_geocoder',
'routing',
'observatory',
'internal_geocoder'
);
CREATE TYPE cdb_dataservices_server.service_params AS (
monthly_quota NUMERIC,
used_quota NUMERIC,

View File

@@ -3,15 +3,6 @@ from log import MetricsDataGatherer
from datetime import date
import re
class Service:
"""The services bound to quota"""
ISOLINES = 'isolines'
HIRES_GEOCODER = 'hires_geocoder'
ROUTING = 'routing'
OBSERVATORY = 'observatory'
INTERNAL_GEOCODER = 'internal_geocoder'
class QuotaService:
""" Class to manage all the quota operation for