コード例 #1
0
 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)
コード例 #2
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 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)
コード例 #3
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)
コード例 #4
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)