diff --git a/utils/rider_location_cache/rider_location_cache.py b/utils/rider_location_cache/rider_location_cache.py index e96cba0e..cbd1bd4b 100644 --- a/utils/rider_location_cache/rider_location_cache.py +++ b/utils/rider_location_cache/rider_location_cache.py @@ -12,14 +12,10 @@ import json class RiderLocationCache(object): def run(self): - global client, redis_conn - client = mqtt.Client() client.on_connect = on_connect # client.on_publish = on_publish client.on_message = on_message - redis_conn = redis.StrictRedis(host='localhost', port=6379, db=0) - #client.tls_set( # "/etc/letsencrypt/live/resqaws.jankstudio.com/fullchain.pem", cert_reqs=ssl.CERT_NONE, # tls_version=ssl.PROTOCOL_TLSv1) @@ -36,6 +32,8 @@ class RiderLocationCache(object): #signal.signal(signal.SIGINT, sigint_handler) client.loop_forever() +client = mqtt.Client() +redis_conn = redis.StrictRedis(host='localhost', port=6379, db=0) def init_subscriptions(client): print "subscribing to wildcard"