From 6ab7070a923f6c54c6f253ee6814cdf4dfd0663c Mon Sep 17 00:00:00 2001 From: Nic Cope Date: Mon, 1 Dec 2014 17:23:38 -0500 Subject: [PATCH] Rename registry timeout to registry ttl This matches job.cleanup() better and (I think) makes the purpose slightly clearer. --- rq/registry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)