Fix warm_vehicle_cache DSN handling
This commit is contained in:
@@ -18,13 +18,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'pos'))
|
||||
import psycopg2
|
||||
import redis
|
||||
|
||||
def _fix_dsn(dsn):
|
||||
if dsn and 'host=' not in dsn and '@/' in dsn:
|
||||
dsn = dsn.replace('@/', '@localhost/')
|
||||
return dsn
|
||||
|
||||
|
||||
MASTER_DB_URL = _fix_dsn(os.environ.get('MASTER_DB_URL', 'postgresql://postgres@localhost/nexus_autoparts'))
|
||||
MASTER_DB_URL = os.environ.get('MASTER_DB_URL', 'postgresql://postgres@/nexus_autoparts')
|
||||
REDIS_URL = os.environ.get('REDIS_URL', 'redis://localhost:6379/0')
|
||||
BATCH_SIZE = 5000
|
||||
TTL_SECONDS = 3600
|
||||
|
||||
Reference in New Issue
Block a user