import os
from rq import Worker
from server.task_queue import get_queue, get_redis_url
import redis


def main():
    conn = redis.from_url(get_redis_url())
    # Single queue named 'conversions'
    w = Worker([get_queue().name], connection=conn)
    w.work(with_scheduler=True)


if __name__ == "__main__":
    main()
