diff --git a/rq/job.py b/rq/job.py index a0574e60..ee8544ad 100644 --- a/rq/job.py +++ b/rq/job.py @@ -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 diff --git a/tests/test_job.py b/tests/test_job.py index 23bbd119..850bf7c4 100644 --- a/tests/test_job.py +++ b/tests/test_job.py @@ -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