15 lines
280 B
Python
15 lines
280 B
Python
from redis import Redis
|
|
from rq import Worker
|
|
|
|
from app.config import get_settings
|
|
|
|
|
|
settings = get_settings()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
connection = Redis.from_url(settings.redis_url)
|
|
worker = Worker([settings.rq_queue_name], connection=connection)
|
|
worker.work()
|
|
|