mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 23:42:07 +01:00
20 lines
533 B
Python
20 lines
533 B
Python
from redis import Redis
|
|
from rq import Queue
|
|
|
|
from config import REDIS_HOST, REDIS_PORT, REDIS_PASSWORD
|
|
|
|
|
|
redis_client = Redis(
|
|
host=REDIS_HOST, port=int(REDIS_PORT), password=REDIS_PASSWORD, db=0
|
|
)
|
|
redis_url = (
|
|
f"redis://:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}"
|
|
if REDIS_PASSWORD
|
|
else f"redis://{REDIS_HOST}:{REDIS_PORT}"
|
|
)
|
|
|
|
|
|
high_prio_queue = Queue(name="high", connection=redis_client)
|
|
default_queue = Queue(name="default", connection=redis_client)
|
|
low_prio_queue = Queue(name="low", connection=redis_client)
|