Adds Fastack option to Disque broker

This commit is contained in:
Ilan Steemers
2015-09-11 17:58:16 +02:00
parent 3894019708
commit 8543c5b328
3 changed files with 17 additions and 6 deletions
+2 -1
View File
@@ -28,7 +28,8 @@ class Disque(Broker):
return self.connection.execute_command('QLEN {}'.format(self.list_key))
def acknowledge(self, task_id):
return self.connection.execute_command('ACKJOB {}'.format(task_id))
command = 'FASTACK' if Conf.DISQUE_FASTACK else 'ACKJOB'
return self.connection.execute_command('{} {}'.format(command,task_id))
def ping(self):
return self.connection.execute_command('HELLO')[0] > 0