Put Job directly in the top-level `rq` module.

main
Vincent Driessen 13 years ago
parent 240d2d941d
commit 8e85c7eee3

@ -1,7 +1,8 @@
from redis import Redis from redis import Redis
from .proxy import conn from .proxy import conn
from .queue import Queue from .queue import Queue, FailedQueue
from .worker import Worker from .worker import Worker
from .job import Job
from .version import VERSION from .version import VERSION
@ -19,5 +20,5 @@ def use_redis(redis=None):
raise TypeError('Argument redis should be a Redis instance.') raise TypeError('Argument redis should be a Redis instance.')
conn.push(redis) conn.push(redis)
__all__ = ['conn', 'Queue', 'Worker', 'use_redis'] __all__ = ['conn', 'Queue', 'FailedQueue', 'Worker', 'Job', 'use_redis']
__version__ = VERSION __version__ = VERSION

@ -3,7 +3,7 @@ from datetime import datetime
from tests import RQTestCase from tests import RQTestCase
from tests.helpers import strip_milliseconds from tests.helpers import strip_milliseconds
from cPickle import loads from cPickle import loads
from rq.job import Job from rq import Job
from rq.exceptions import NoSuchJobError, UnpickleError from rq.exceptions import NoSuchJobError, UnpickleError

@ -1,7 +1,6 @@
from tests import RQTestCase from tests import RQTestCase
from tests import testjob from tests import testjob
from rq import Queue from rq import Queue, FailedQueue, Job
from rq.job import Job
class TestQueue(RQTestCase): class TestQueue(RQTestCase):

@ -2,8 +2,7 @@ import os
from tests import RQTestCase from tests import RQTestCase
from tests import testjob, failing_job from tests import testjob, failing_job
from tests.helpers import strip_milliseconds from tests.helpers import strip_milliseconds
from rq import Queue, Worker from rq import Queue, Worker, Job
from rq.job import Job
SENTINEL_FILE = '/tmp/rq-tests.txt' SENTINEL_FILE = '/tmp/rq-tests.txt'

Loading…
Cancel
Save