Skip to content

Commit

Permalink
Fixed issue bbangert#29. Bug 'Worker' object has no attribute 'serial…
Browse files Browse the repository at this point in the history
…izer'
  • Loading branch information
jayd3e committed Jul 30, 2014
1 parent 0d54a2f commit 3d41f87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion retools/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def run_event(self, event, **kwargs):

class Worker(object):
"""A Worker works on jobs"""
def __init__(self, queues, redis=None):
def __init__(self, queues, redis=None, serializer=json.dumps, deserializer=json.loads):
"""Create a worker
:param queues: List of queues to process
Expand All @@ -389,6 +389,8 @@ def __init__(self, queues, redis=None):
"""
self.redis = redis or global_connection.redis
self.serializer = serializer
self.deserializer = deserializer
if not queues:
raise ConfigurationError(
"No queues were configured for this worker")
Expand Down

0 comments on commit 3d41f87

Please sign in to comment.