mirror of https://github.com/rq/rq.git
Remove extra colon in dependencies key
This seems like a bug, but if I'm mistaken please let me know.
This commit is contained in:
parent
b03413e9eb
commit
5ebf7a3500
|
@ -716,7 +716,7 @@ class Job:
|
|||
|
||||
@property
|
||||
def dependencies_key(self):
|
||||
return '{0}:{1}:dependencies'.format(self.redis_job_namespace_prefix, self.id)
|
||||
return '{0}{1}:dependencies'.format(self.redis_job_namespace_prefix, self.id)
|
||||
|
||||
def fetch_dependencies(self, watch: bool = False, pipeline: Optional['Pipeline'] = None) -> List['Job']:
|
||||
"""Fetch all of a job's dependencies. If a pipeline is supplied, and
|
||||
|
|
|
@ -994,7 +994,7 @@ class TestJob(RQTestCase):
|
|||
def test_dependencies_key_should_have_prefixed_job_id(self):
|
||||
job_id = 'random'
|
||||
job = Job(id=job_id)
|
||||
expected_key = Job.redis_job_namespace_prefix + ":" + job_id + ':dependencies'
|
||||
expected_key = Job.redis_job_namespace_prefix + job_id + ':dependencies'
|
||||
|
||||
assert job.dependencies_key == expected_key
|
||||
|
||||
|
|
Loading…
Reference in New Issue