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"
|
os.environ["DJANGO_ALLOW_ASYNC_UNSAFE"] = "true"
|
||||||
|
|
||||||
|
# /var/run/neptune-redis.sock
|
||||||
r = StrictRedis(
|
# use the socket
|
||||||
host=settings.REDIS_HOST,
|
r = StrictRedis(unix_socket_path="/var/run/neptune-redis.sock", db=settings.REDIS_DB)
|
||||||
port=settings.REDIS_PORT,
|
# r = StrictRedis(
|
||||||
password=settings.REDIS_PASSWORD,
|
# host=settings.REDIS_HOST,
|
||||||
db=settings.REDIS_DB
|
# port=settings.REDIS_PORT,
|
||||||
)
|
# password=settings.REDIS_PASSWORD,
|
||||||
|
# db=settings.REDIS_DB
|
||||||
|
# )
|
||||||
|
|
||||||
if settings.STRIPE_TEST:
|
if settings.STRIPE_TEST:
|
||||||
stripe.api_key = settings.STRIPE_API_KEY_TEST
|
stripe.api_key = settings.STRIPE_API_KEY_TEST
|
||||||
|
@ -94,12 +94,13 @@ def process_rules(data):
|
|||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
r = StrictRedis(
|
r = StrictRedis(unix_socket_path="/var/run/neptune-redis.sock", db=10) # To match Monolith DB
|
||||||
host=settings.REDIS_HOST,
|
# r = StrictRedis(
|
||||||
port=settings.REDIS_PORT,
|
# host=settings.REDIS_HOST,
|
||||||
password=settings.REDIS_PASSWORD,
|
# port=settings.REDIS_PORT,
|
||||||
db=settings.REDIS_DB
|
# password=settings.REDIS_PASSWORD,
|
||||||
)
|
# db=settings.REDIS_DB
|
||||||
|
# )
|
||||||
p = r.pubsub()
|
p = r.pubsub()
|
||||||
p.psubscribe("messages")
|
p.psubscribe("messages")
|
||||||
for message in p.listen():
|
for message in p.listen():
|
||||||
|
Loading…
Reference in New Issue
Block a user