diff --git a/rq/registry.py b/rq/registry.py index c620eb9..beabbad 100644 --- a/rq/registry.py +++ b/rq/registry.py @@ -27,9 +27,9 @@ class BaseRegistry(object): self.cleanup() return self.connection.zcard(self.key) - def add(self, job, timeout, pipeline=None): - """Adds a job to a registry with expiry time of now + timeout.""" - score = timeout if timeout < 0 else current_timestamp() + timeout + def add(self, job, ttl, pipeline=None): + """Adds a job to a registry with expiry time of now + ttl.""" + score = ttl if ttl < 0 else current_timestamp() + ttl if pipeline is not None: return pipeline.zadd(self.key, score, job.id)