Commit a5e5ac0e authored by Gottfried Gaisbauer's avatar Gottfried Gaisbauer
Browse files

hopefully last time: redis conn configurable

parent f1e2924e
Pipeline #555 passed with stage
in 1 minute and 25 seconds
......@@ -57,6 +57,8 @@ class Aura(AuraLogger):
# self.diskspace_watcher = DiskSpaceWatcher(self.config, self.logger, self.liquidsoapcommunicator)
# self.diskspace_watcher.start()
def receive_signal(signum, stack):
print("received signal")
server.reload()
......
......@@ -73,7 +73,7 @@ class ServerRedisAdapter(threading.Thread, RedisMessenger):
# ------------------------------------------------------------------------------------------ #
def run(self):
self.redisdb = redis.Redis()
self.redisdb = redis.Redis(host=self.config.get("redis_host"), port=self.config.get("redis_port"), db=self.config.get("redis_db"))
self.pubsub = self.redisdb.pubsub()
self.pubsub.subscribe(self.channel)
......@@ -110,7 +110,7 @@ class ServerRedisAdapter(threading.Thread, RedisMessenger):
# ------------------------------------------------------------------------------------------ #
def listen_for_one_message(self, channel, socket_timeout=2):
self.redisdb = redis.Redis(socket_timeout=socket_timeout)
self.redisdb = redis.Redis(host=self.config.get("redis_host"), port=self.config.get("redis_port"), db=self.config.get("redis_db"), socket_timeout=socket_timeout)
self.pubsub = self.redisdb.pubsub()
self.pubsub.subscribe(channel)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment