传递 return 来指定 GearmanWorker 上回调函数的结果
我试图传递一些数据或操作结果的标识符,例如“true”或“false”。目前我只能根据完成和失败的回调来考虑任务的返回代码。 您能否提供一些有关如何将数据传递给结果的想法。
I am trying to pass some data or an identifier of the result of the operation like 'true' or 'false'. For now I can only think of the return code of the task based on the callback for complete and failed.
Can you give some ideas on how to pass data to the result.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经弄清楚了这一点。我所做的是在客户端上包含一个 setCompleteCallback 并在工作线程上包含一个 sendComplete 。通过 sendComplete 发送的序列化数据可以由使用 setComplete 注册的回调接收。
I have figured out this one. What I did is that I include a setCompleteCallback on the client and a sendComplete on the the worker. A serialized data sent through sendComplete can be received by the registered callback using setComplete.