Merge pull request #247 from CartoDB/development

Remove the gateway error from QPS for Mapzen provider
This commit is contained in:
Mario de Frutos
2016-08-01 11:25:06 +02:00
committed by GitHub
2 changed files with 12 additions and 1 deletions

View File

@@ -41,3 +41,14 @@ CREATE EXTENSION cdb_dataservices_client;
```
The extension creation in the user's db requires **superuser** privileges.
## User database configuration
After installing the client extension in a database, you will need to set up your configuration to be able to connect with the server.
```
-- Point to the dataservices server DB (you can use a specific database for the server or your same user's):
SELECT CDB_Conf_SetConf('geocoder_server_config', '{ "connection_str": "host=localhost port=5432 dbname=<SERVER_DB_NAME> user=postgres"}');
SELECT CDB_Conf_SetConf('user_config', '{"is_organization": false, "entity_name": "<YOUR_USERNAME>"}');
```

View File

@@ -26,7 +26,7 @@ class QPSService:
try:
return fn(*args, **kwargs)
except Exception as e:
if hasattr(e, 'response') and (e.response.status_code == 429 or e.response.status_code == 504):
if hasattr(e, 'response') and (e.response.status_code == 429):
self.retry(start_time, attempt_number)
else:
raise e