rq/examples/run_worker.py

12 lines
314 B
Python

# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from rq import Connection, Queue, Worker
if __name__ == '__main__':
# Tell rq what Redis connection to use
with Connection():
q = Queue()
Worker(q).work()