简体   繁体   English

zend xmlrpc进程需要正常终止

[英]zend xmlrpc process needs to die gracefully

I have a Zend XMLRPC web service running, but in my class I need the script to die gracefully and would like XMLRPC not to throw an error. 我正在运行一个Zend XMLRPC Web服务,但是在我的课堂上,我需要脚本正常退出,并希望XMLRPC不要抛出错误。 Is this possible? 这可能吗?

Over view 俯瞰

XMLRPC client starts the call that starts an instance of a class, XMLRPC client passes query value to the object if query doesn't return a value I need the script to email me with the query and the value passed for debugging. XMLRPC客户端启动调用,该调用启动一个类的实例,如果查询未返回值,则XMLRPC客户端将查询值传递给对象。我需要脚本通过查询向我发送电子邮件以及为调试而传递的值。 (This all works) If nothing is found, send email and kill the process, I'm using the die() to stop the process. (所有这些都有效)如果什么也没找到,请发送电子邮件并终止该进程,我正在使用die()停止该进程。 If results are found moves on in the process and returns a value for the XMLRPC (this part work if the query returns any results, but errors out if no results are found) 如果找到结果,则继续执行该过程,并返回XMLRPC的值(如果查询返回任何结果,则此部分起作用,但如果未找到结果,则出错)

How can I kill the process and still return something back to the XMLRPC call? 我如何才能终止进程并仍然将某些内容返回给XMLRPC调用?

I guess I could recode this functionality (this would be the correct way) just thought the die would return something and not just print something to the terminal logs 我想我可以重新编码此功能(这是正确的方法),只是认为模具会返回某些东西而不仅仅是在终端日志中打印一些东西

unfortunately the process can not die or exit, you must return a error message to the XMLRPC request. 不幸的是,该进程无法终止或退出,必须向XMLRPC请求返回错误消息。 Using the die() or exit() results in XMLRPC throwing an error which breaks the process altogether. 使用die()或exit()会导致XMLRPC抛出错误,从而完全中断该过程。 Now time to recode 现在该重新编码了

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM