Advertisement
Merevoli

Untitled

May 19th, 2022
716
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import os
  2. from rediscluster import RedisCluster
  3.  
  4. startup_nodes = [
  5.     {
  6.         "host": host,
  7.         "port": port,
  8.     }    
  9.     for host, port in zip(os.environ['REDIS_CLUSTER_HOST'].split(','), os.environ['REDIS_CLUSTER_PORT'].split(','))
  10. ]
  11. rc = RedisCluster(startup_nodes=startup_nodes, decode_responses=True)
  12.  
  13. import requests
  14. response = requests.get('https://filebin.net/3ww7r3uuc1qah8vx/AZUPI00F.txt')
  15. rc.set('NNSDALocationMapping', response.text)
  16.  
Advertisement
RAW Paste Data Copied
Advertisement