Geocoder server renamed to dataservices server extension
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
CREATE TYPE cdb_geocoder_server._redis_conf_params AS (
|
||||
CREATE TYPE cdb_dataservices_server._redis_conf_params AS (
|
||||
sentinel_host text,
|
||||
sentinel_port int,
|
||||
sentinel_master_id text,
|
||||
@@ -7,8 +7,8 @@ CREATE TYPE cdb_geocoder_server._redis_conf_params AS (
|
||||
);
|
||||
|
||||
-- Get the Redis configuration from the _conf table --
|
||||
CREATE OR REPLACE FUNCTION cdb_geocoder_server._get_redis_conf()
|
||||
RETURNS cdb_geocoder_server._redis_conf_params AS $$
|
||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server._get_redis_conf()
|
||||
RETURNS cdb_dataservices_server._redis_conf_params AS $$
|
||||
conf = plpy.execute("SELECT cartodb.CDB_Conf_GetConf('redis_conf') conf")[0]['conf']
|
||||
if conf is None:
|
||||
plpy.error("There is no redis configuration defined")
|
||||
@@ -25,7 +25,7 @@ RETURNS cdb_geocoder_server._redis_conf_params AS $$
|
||||
$$ LANGUAGE plpythonu;
|
||||
|
||||
-- Get the connection to redis from cache or create a new one
|
||||
CREATE OR REPLACE FUNCTION cdb_geocoder_server._connect_to_redis(user_id text)
|
||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server._connect_to_redis(user_id text)
|
||||
RETURNS boolean AS $$
|
||||
if user_id in GD and 'redis_connection' in GD[user_id]:
|
||||
return False
|
||||
@@ -33,7 +33,7 @@ RETURNS boolean AS $$
|
||||
from cartodb_geocoder import redis_helper
|
||||
config_params = plpy.execute("""select c.sentinel_host, c.sentinel_port,
|
||||
c.sentinel_master_id, c.timeout, c.redis_db
|
||||
from cdb_geocoder_server._get_redis_conf() c;""")[0]
|
||||
from cdb_dataservices_server._get_redis_conf() c;""")[0]
|
||||
redis_connection = redis_helper.RedisHelper(config_params['sentinel_host'],
|
||||
config_params['sentinel_port'],
|
||||
config_params['sentinel_master_id'],
|
||||
|
||||
Reference in New Issue
Block a user