Use __slots__, for minimal memory overhead.

This commit is contained in:
Vincent Driessen 2011-11-16 19:12:19 +01:00
parent ced001cbb9
commit 0ff2984adf
1 changed files with 2 additions and 0 deletions

View File

@ -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):