From 071c47dacba06f55de9d9a1569ac91592dc18eb2 Mon Sep 17 00:00:00 2001 From: glaslos Date: Thu, 19 Mar 2015 15:32:01 +0100 Subject: [PATCH] hard-coded TTL to -1 on job.perform() Removed merge artifacts --- rq/job.py | 2 +- tests/test_job.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/rq/job.py b/rq/job.py index 7195ddb..ffa7983 100644 --- a/rq/job.py +++ b/rq/job.py @@ -486,7 +486,7 @@ class Job(object): def perform(self): # noqa """Invokes the job function with the job arguments.""" self.connection.persist(self.key) - self.ttl = self.connection.ttl(self.key) + self.ttl = -1 _job_stack.push(self.id) try: self._result = self.func(*self.args, **self.kwargs) diff --git a/tests/test_job.py b/tests/test_job.py index 2e91751..600cefd 100644 --- a/tests/test_job.py +++ b/tests/test_job.py @@ -4,11 +4,6 @@ from __future__ import (absolute_import, division, print_function, from datetime import datetime -from tests import RQTestCase -from tests.fixtures import (access_self, CallableObject, Number, say_hello, - some_calculation) -from tests.helpers import strip_microseconds - from rq.compat import as_text, PY2 from rq.exceptions import NoSuchJobError, UnpickleError from rq.job import get_current_job, Job