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 time
from rq import Queue
from rq import Queue, use_connection
from fib import slow_fib
# Tell RQ what Redis connection to use
from redis import Redis
from rq import conn
conn.push(Redis())
use_connection()
# Range of Fibonacci numbers to compute
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
from redis import Redis
from rq import conn
conn.push(Redis())
use_connection()
if __name__ == '__main__':
q = Queue()

Loading…
Cancel
Save