Last active
October 4, 2018 11:03
-
-
Save matabares/a97693fa21d83df950e1ddf1ceeffa41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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