Fixed examples. use_connection is now being used.

main
Jeffrey Gelens 13 years ago
parent 697a4a89f8
commit 31259fa106

@ -1,13 +1,10 @@
import os import os
import time import time
from rq import Queue from rq import Queue, use_connection
from fib import slow_fib from fib import slow_fib
# Tell RQ what Redis connection to use # Tell RQ what Redis connection to use
from redis import Redis use_connection()
from rq import conn
conn.push(Redis())
# Range of Fibonacci numbers to compute # Range of Fibonacci numbers to compute
fib_range = range(20, 34) fib_range = range(20, 34)

@ -1,9 +1,7 @@
from rq import Queue, Worker from rq import Queue, Worker, use_connection
# Tell rq what Redis connection to use # Tell rq what Redis connection to use
from redis import Redis use_connection()
from rq import conn
conn.push(Redis())
if __name__ == '__main__': if __name__ == '__main__':
q = Queue() q = Queue()

Loading…
Cancel
Save