rq/examples/run_worker.py

12 lines
314 B
Python
Raw Normal View History

2014-05-05 08:49:29 +00:00
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
2011-11-14 14:15:05 +00:00
2014-05-05 08:49:29 +00:00
from rq import Connection, Queue, Worker
2011-11-14 14:15:05 +00:00
2011-11-15 21:45:51 +00:00
if __name__ == '__main__':
# Tell rq what Redis connection to use
with Connection():
q = Queue()
Worker(q).work()