mirror of
https://github.com/lucky-sideburn/kubeinvaders.git
synced 2026-08-23 21:46:21 +00:00
fix v2.0.0
This commit is contained in:
@@ -158,12 +158,7 @@ logging.getLogger('kubernetes').setLevel(logging.ERROR)
|
||||
|
||||
logging.debug('Starting script for KubeInvaders taking logs from pods...')
|
||||
|
||||
file = pathlib.Path('/tmp/redis.sock')
|
||||
|
||||
if file.exists():
|
||||
r = redis.Redis(unix_socket_path='/tmp/redis.sock', charset="utf-8", decode_responses=True)
|
||||
else:
|
||||
r = redis.Redis("127.0.0.1", charset="utf-8", decode_responses=True)
|
||||
r = redis.Redis(host='127.0.0.1', port=6379, charset="utf-8", decode_responses=True)
|
||||
|
||||
if os.environ.get("DEV"):
|
||||
logging.debug("Setting env var for dev...")
|
||||
|
||||
@@ -15,7 +15,7 @@ RESOLVED_ENDPOINT=""
|
||||
REDIS_ENDPOINT=$(python3 - <<'PY'
|
||||
import redis
|
||||
try:
|
||||
r = redis.Redis(unix_socket_path='/tmp/redis.sock', decode_responses=True)
|
||||
r = redis.Redis(host='127.0.0.1', port=6379, decode_responses=True)
|
||||
v = r.get('k8s_api_endpoint')
|
||||
print(v.strip() if v else '')
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user