mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 18:11:16 +01:00
17 lines
443 B
Python
Executable File
17 lines
443 B
Python
Executable File
import sys
|
|
from rq import Worker, Queue, Connection
|
|
|
|
from config import ENABLE_EXPERIMENTAL_REDIS
|
|
from utils.cache import redis_client, redis_connectable
|
|
|
|
listen = ["high", "default", "low"]
|
|
|
|
if __name__ == "__main__":
|
|
# Exit if Redis is not connectable
|
|
if not redis_connectable or not ENABLE_EXPERIMENTAL_REDIS:
|
|
sys.exit(0)
|
|
|
|
with Connection(redis_client):
|
|
worker = Worker(map(Queue, listen))
|
|
worker.work()
|