在 molecularr js中,如何在服务启动后立即调用其自己的服务的操作?
我正在使用 molecularr js,其中需要调用其自己服务的操作/处理函数来预填充来自数据库和外部 API 调用的值。如果我使用started()方法,服务会抛出以下错误。
[Runner] 找不到服务“serviceName.actionName”。 ServiceNotFoundError:找不到服务“serviceName.actionName”。
您能否分享初学者文档/资源以供参考? TIA
I am working in moleculer js, in which there is a requirement to call action/handler function of its own service to prepopulate the values from the DB and ecternal API call. If I do using started() method, service throwing below error.
[Runner] Service 'serviceName.actionName' is not found. ServiceNotFoundError: Service 'serviceName.actionName' is not found.
Could you share the beginner documentation/resources for reference? TIA
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该服务可以通过 this.actions.myAction(params, opts) 调用自己的操作。它在服务启动/注册之前可用。
The service can call its own actions via
this.actions.myAction(params, opts)
. It's available before the service started/registered.