mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-08 23:18:11 +08:00
Adds extra AUTH before PING
This commit is contained in:
@@ -23,6 +23,8 @@ class Disque(Broker):
|
|||||||
return self.connection.execute_command('ACKJOB {}'.format(task_id))
|
return self.connection.execute_command('ACKJOB {}'.format(task_id))
|
||||||
|
|
||||||
def ping(self):
|
def ping(self):
|
||||||
|
if Conf.DISQUE_AUTH:
|
||||||
|
self.connection.execute_command('AUTH {}'.format(Conf.DISQUE_AUTH))
|
||||||
return self.connection.execute_command('HELLO')[0] > 0
|
return self.connection.execute_command('HELLO')[0] > 0
|
||||||
|
|
||||||
def delete(self, task_id):
|
def delete(self, task_id):
|
||||||
|
|||||||
Reference in New Issue
Block a user