Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lars Kruse
aura-engine
Commits
a5e5ac0e
Commit
a5e5ac0e
authored
Aug 10, 2019
by
Gottfried Gaisbauer
Browse files
hopefully last time: redis conn configurable
parent
f1e2924e
Changes
2
Hide whitespace changes
Inline
Side-by-side
aura.py
View file @
a5e5ac0e
...
...
@@ -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
()
...
...
modules/communication/redis/adapter.py
View file @
a5e5ac0e
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment