Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@matabares
Last active October 4, 2018 11:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matabares/a97693fa21d83df950e1ddf1ceeffa41 to your computer and use it in GitHub Desktop.
Save matabares/a97693fa21d83df950e1ddf1ceeffa41 to your computer and use it in GitHub Desktop.
#pub
REDISIO_PASSWORD = os.environ.get("CRAWLER_REDISIO_KEY")
redisClient = redis.StrictRedis(host='188.166.1.146', port=6379, db=0, password=REDISIO_PASSWORD)
redisClient.publish('NetsuiteMonitoringAlarmsChannel', alarmData)
# subs
redisClient=mtutils.getRedisClient()
subs=redisClient.pubsub()
subs.subscribe("NetsuiteMonitoringAlarmsChannel")
for alarmItem in subs.listen():
#do task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment