def produce_job_tes(): Consumer.push_task(queue_ip='103.6.222.21', queue_port=4730, queue_name='OCDNQUEUE', data='hello')
def produce_job_tes(): Consumer.push_task(queue_ip="103.6.222.21", queue_port=4730, queue_name="OCDNQUEUE", data="hello")
def do_task(self, gearman_worker, job): data = job.data parameters = json.loads(data) Consumer.push_task(queue_ip='103.6.222.21', queue_port=4730, queue_name='OCDNQUEUE', data=parameters) print parameters return 'True'