def work(self, jobs): """Children only: register all jobs, start working.""" worker = GearmanWorker() for job in jobs: worker.register_task(job.__name__, job) try: worker.work() except KeyboardInterrupt: sys.exit(0)
def work(self, jobs): """children only: register all jobs, start working""" worker = GearmanWorker() for job in jobs: worker.register_function(job.register_as, job) try: worker.work() except KeyboardInterrupt: sys.exit(0)