Skip to content

Commit

Permalink
Merge pull request rq#628 from SkyLothar/master
Browse files Browse the repository at this point in the history
make sure state and exc_info is text_type
  • Loading branch information
nvie committed Dec 6, 2015
2 parents 45addbc + 70b5554 commit 6fe277b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rq/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def to_date(date_str):
self.started_at = to_date(as_text(obj.get('started_at')))
self.ended_at = to_date(as_text(obj.get('ended_at')))
self._result = unpickle(obj.get('result')) if obj.get('result') else None # noqa
self.exc_info = obj.get('exc_info')
self.exc_info = as_text(obj.get('exc_info'))
self.timeout = int(obj.get('timeout')) if obj.get('timeout') else None
self.result_ttl = int(obj.get('result_ttl')) if obj.get('result_ttl') else None # noqa
self._status = as_text(obj.get('status') if obj.get('status') else None)
Expand Down
2 changes: 1 addition & 1 deletion rq/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def find_by_key(cls, worker_key, connection=None):
name = worker_key[len(prefix):]
worker = cls([], name, connection=connection)
queues = as_text(connection.hget(worker.key, 'queues'))
worker._state = connection.hget(worker.key, 'state') or '?'
worker._state = as_text(connection.hget(worker.key, 'state') or '?')
worker._job_id = connection.hget(worker.key, 'current_job') or None
if queues:
worker.queues = [cls.queue_class(queue, connection=connection)
Expand Down

0 comments on commit 6fe277b

Please sign in to comment.