Implement a ServerConfigBackendFactory

mostly to keep layers separated.
This commit is contained in:
Rafa de la Torre
2016-10-03 17:42:17 +02:00
parent 12aebb7eee
commit 35da7e48fd
2 changed files with 21 additions and 8 deletions

View File

@@ -0,0 +1,13 @@
from cartodb_services.refactor.storage.server_config import InDbServerConfigStorage
class ServerConfigBackendFactory(object):
"""
This class creates a backend to retrieve server configurations (implementing the ConfigBackendInterface).
At this moment it will always return an InDbServerConfigStorage, but nothing prevents from changing the
implementation. To something that reads from a file, memory or whatever. It is mostly there to keep
the layers separated.
"""
def get(self):
return InDbServerConfigStorage()