Update more Redis URLs
This commit is contained in:
parent
6ff75890b9
commit
fe087eb591
@ -6,13 +6,15 @@ from redis import StrictRedis
|
||||
|
||||
os.environ["DJANGO_ALLOW_ASYNC_UNSAFE"] = "true"
|
||||
|
||||
|
||||
r = StrictRedis(
|
||||
host=settings.REDIS_HOST,
|
||||
port=settings.REDIS_PORT,
|
||||
password=settings.REDIS_PASSWORD,
|
||||
db=settings.REDIS_DB
|
||||
)
|
||||
# /var/run/neptune-redis.sock
|
||||
# use the socket
|
||||
r = StrictRedis(unix_socket_path="/var/run/neptune-redis.sock", db=settings.REDIS_DB)
|
||||
# r = StrictRedis(
|
||||
# host=settings.REDIS_HOST,
|
||||
# port=settings.REDIS_PORT,
|
||||
# password=settings.REDIS_PASSWORD,
|
||||
# db=settings.REDIS_DB
|
||||
# )
|
||||
|
||||
if settings.STRIPE_TEST:
|
||||
stripe.api_key = settings.STRIPE_API_KEY_TEST
|
||||
|
@ -94,12 +94,13 @@ def process_rules(data):
|
||||
|
||||
class Command(BaseCommand):
|
||||
def handle(self, *args, **options):
|
||||
r = StrictRedis(
|
||||
host=settings.REDIS_HOST,
|
||||
port=settings.REDIS_PORT,
|
||||
password=settings.REDIS_PASSWORD,
|
||||
db=settings.REDIS_DB
|
||||
)
|
||||
r = StrictRedis(unix_socket_path="/var/run/neptune-redis.sock", db=10) # To match Monolith DB
|
||||
# r = StrictRedis(
|
||||
# host=settings.REDIS_HOST,
|
||||
# port=settings.REDIS_PORT,
|
||||
# password=settings.REDIS_PASSWORD,
|
||||
# db=settings.REDIS_DB
|
||||
# )
|
||||
p = r.pubsub()
|
||||
p.psubscribe("messages")
|
||||
for message in p.listen():
|
||||
|
Loading…
Reference in New Issue
Block a user