From eb6fb27281a3a77b6041601f2d11ad9fb3560545 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Fri, 25 Jul 2014 23:59:01 +0200 Subject: [PATCH] Change confusing method name. --- rq/job.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rq/job.py b/rq/job.py index 0e6d5ff..e8203e5 100644 --- a/rq/job.py +++ b/rq/job.py @@ -403,7 +403,7 @@ class Job(object): self._dependency_id = as_text(obj.get('dependency_id', None)) self.meta = unpickle(obj.get('meta')) if obj.get('meta') else {} - def dump(self): + def to_dict(self): """Returns a serialization of the current job instance""" obj = {} obj['created_at'] = utcformat(self.created_at or utcnow()) @@ -439,7 +439,7 @@ class Job(object): key = self.key connection = pipeline if pipeline is not None else self.connection - connection.hmset(key, self.dump()) + connection.hmset(key, self.to_dict()) def cancel(self): """Cancels the given job, which will prevent the job from ever being