1 2 3 4 5 6 7 8 9 10 11 12
from time import sleep from redis import Redis from rq import Queue from testmod import test q = Queue('slices', connection=Redis(host='localhost')) j = q.enqueue(test) print(j.result) while j.result == None: sleep(1) print(j.result)