From 0ff2984adf259a99750e0eb1734af1394b88e2cf Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Wed, 16 Nov 2011 19:12:19 +0100 Subject: [PATCH] Use __slots__, for minimal memory overhead. --- rq/queue.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rq/queue.py b/rq/queue.py index 6b3d4a76..e4278006 100644 --- a/rq/queue.py +++ b/rq/queue.py @@ -17,9 +17,11 @@ class DelayedResult(object): self._rv = loads(rv) return self._rv + class Job(object): """A Job is just a convenient datastructure to pass around job (meta) data. """ + __slots__ = ['func', 'args', 'kwargs', 'rv_key', 'origin'] @classmethod def unpickle(cls, pickle_data):