mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-23 17:52:36 -04:00
Add support for RabbitMQ connection string to the Autosync service
Signed-off-by: Fred Heincke <fred.heinecke@yahoo.com>
This commit is contained in:
parent
a39baa1b50
commit
02c2a2db52
12
autosync/.env.example
Normal file
12
autosync/.env.example
Normal file
@ -0,0 +1,12 @@
|
||||
# vi: ft=sh
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
# RabbitMQ settings
|
||||
# URL examples: https://docs.aio-pika.com/#url-examples
|
||||
# This uses AIORMQ (https://github.com/mosquito/aiormq/) under the hood, and supports whatever the library supports.
|
||||
# RABBITMQ_URL=ampqs://user:password@rabbitmq-server:1234/vhost?capath=/path/to/cacert.pem&certfile=/path/to/cert.pem&keyfile=/path/to/key.pem
|
||||
# These values are ignored when the RABBITMQ_URL is set
|
||||
RABBITMQ_HOST=rabbitmq
|
||||
RABBITMQ_PORT=5672
|
||||
RABBITMQ_USER=guest
|
||||
RABBITMQ_PASSWORD=guest
|
@ -17,6 +17,7 @@ class Consumer:
|
||||
|
||||
async def __aenter__(self):
|
||||
self._con = await connect_robust(
|
||||
os.environ.get("RABBITMQ_URL"),
|
||||
host=os.environ.get("RABBITMQ_HOST", "rabbitmq"),
|
||||
port=int(os.environ.get("RABBITMQ_PORT", "5672")),
|
||||
login=os.environ.get("RABBITMQ_DEFAULT_USER", "guest"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user