1
是否可以从本地系统调用远程gearman工人?我试图用我的远程蔚蓝的服务器IP呼叫:从本地gearman客户端调用远程gearman工人?
客户端在本地系统上:
gm_client = gearman.GearmanClient(['204.43.9.41:4730'])
sent = sys.argv[1]
completed_job_request = gm_client.submit_job("load_db", sent)
远程工作人员:
def __init__(self):
self.gm_worker = gearman.GearmanWorker(['204.43.9.41:4730'])
self.context = self.init_context()
res = self.gm_worker.register_task('load_db', self.run_query)
当我把远程服务器上运行的工作,并从本地客户端调用,它给出了这个错误:
gearman.errors.ServerUnavailable: Found no valid connections: GearmanConnection 204.43.9.41:4730 connected=False