mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 23:06:11 +00:00
16 lines
365 B
Python
Executable File
16 lines
365 B
Python
Executable File
import sys
|
|
from rq import Worker, Queue, Connection
|
|
|
|
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:
|
|
sys.exit(0)
|
|
|
|
with Connection(redis_client):
|
|
worker = Worker(map(Queue, listen))
|
|
worker.work()
|