mirror of https://github.com/rq/rq.git
Put Job directly in the top-level `rq` module.
This commit is contained in:
parent
240d2d941d
commit
8e85c7eee3
|
@ -1,7 +1,8 @@
|
|||
from redis import Redis
|
||||
from .proxy import conn
|
||||
from .queue import Queue
|
||||
from .queue import Queue, FailedQueue
|
||||
from .worker import Worker
|
||||
from .job import Job
|
||||
from .version import VERSION
|
||||
|
||||
|
||||
|
@ -19,5 +20,5 @@ def use_redis(redis=None):
|
|||
raise TypeError('Argument redis should be a Redis instance.')
|
||||
conn.push(redis)
|
||||
|
||||
__all__ = ['conn', 'Queue', 'Worker', 'use_redis']
|
||||
__all__ = ['conn', 'Queue', 'FailedQueue', 'Worker', 'Job', 'use_redis']
|
||||
__version__ = VERSION
|
||||
|
|
|
@ -3,7 +3,7 @@ from datetime import datetime
|
|||
from tests import RQTestCase
|
||||
from tests.helpers import strip_milliseconds
|
||||
from cPickle import loads
|
||||
from rq.job import Job
|
||||
from rq import Job
|
||||
from rq.exceptions import NoSuchJobError, UnpickleError
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from tests import RQTestCase
|
||||
from tests import testjob
|
||||
from rq import Queue
|
||||
from rq.job import Job
|
||||
from rq import Queue, FailedQueue, Job
|
||||
|
||||
|
||||
class TestQueue(RQTestCase):
|
||||
|
|
|
@ -2,8 +2,7 @@ import os
|
|||
from tests import RQTestCase
|
||||
from tests import testjob, failing_job
|
||||
from tests.helpers import strip_milliseconds
|
||||
from rq import Queue, Worker
|
||||
from rq.job import Job
|
||||
from rq import Queue, Worker, Job
|
||||
|
||||
|
||||
SENTINEL_FILE = '/tmp/rq-tests.txt'
|
||||
|
|
Loading…
Reference in New Issue