Compare commits
7 Commits
0.22.0-cli
...
python-0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af0125197d | ||
|
|
051453898e | ||
|
|
6047300259 | ||
|
|
84749a2631 | ||
|
|
c0cc5fe6a7 | ||
|
|
b16f7e6ed5 | ||
|
|
9b8045f2ed |
@@ -38,7 +38,7 @@ Steps to deploy a new Data Services API version :
|
||||
|
||||
```
|
||||
# in dataservices-api repo root path:
|
||||
cd server/lib/python/cartodb_services && pip install -r requirements.txt && sudo pip install . --upgrade
|
||||
cd server/lib/python/cartodb_services && sudo pip install -r requirements.txt && sudo pip install . --upgrade
|
||||
```
|
||||
|
||||
- Create a database to hold all the server part and a user for it
|
||||
|
||||
@@ -10,7 +10,7 @@ from urlparse import urlparse
|
||||
|
||||
|
||||
@contextmanager
|
||||
def metrics(function, service_config, logger=None):
|
||||
def metrics(function, service_config, logger=None, params=None):
|
||||
try:
|
||||
start_time = time.time()
|
||||
yield
|
||||
@@ -18,6 +18,7 @@ def metrics(function, service_config, logger=None):
|
||||
end_time = time.time()
|
||||
MetricsDataGatherer.add('uuid', str(uuid.uuid1()))
|
||||
MetricsDataGatherer.add('function_name', function)
|
||||
MetricsDataGatherer.add('function_params', params)
|
||||
MetricsDataGatherer.add('function_execution_time', (end_time - start_time))
|
||||
metrics_logger = MetricsServiceLoggerFactory.build(service_config,
|
||||
logger)
|
||||
@@ -155,6 +156,7 @@ class MetricsLogger(object):
|
||||
"uuid": data.get('uuid', uuid.uuid1()),
|
||||
"type": 'function',
|
||||
"function_name": data.get('function_name', None),
|
||||
"function_params": data.get('function_params', None),
|
||||
"function_execution_time": data.get('function_execution_time',
|
||||
None),
|
||||
"service": self._service_config.service_type,
|
||||
|
||||
@@ -10,7 +10,7 @@ from setuptools import setup, find_packages
|
||||
setup(
|
||||
name='cartodb_services',
|
||||
|
||||
version='0.15.6',
|
||||
version='0.15.7',
|
||||
|
||||
description='CartoDB Services API Python Library',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user