mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-27 16:18:11 +08:00
Fixes class super for python 2.7
This commit is contained in:
@@ -7,7 +7,7 @@ from boto.sqs.message import Message
|
||||
|
||||
class Sqs(Broker):
|
||||
def __init__(self, list_key=Conf.PREFIX):
|
||||
super().__init__(list_key)
|
||||
super(Sqs, self).__init__(list_key)
|
||||
self.queue = self.get_queue()
|
||||
|
||||
def enqueue(self, task):
|
||||
|
||||
@@ -11,7 +11,7 @@ except ImportError:
|
||||
class Redis(Broker):
|
||||
|
||||
def __init__(self, list_key=Conf.PREFIX):
|
||||
super().__init__(list_key='django_q:{}:q'.format(list_key))
|
||||
super(Redis, self).__init__(list_key='django_q:{}:q'.format(list_key))
|
||||
|
||||
def enqueue(self, task):
|
||||
return self.connection.rpush(self.list_key, task)
|
||||
|
||||
Reference in New Issue
Block a user