在 molecularr js中,如何在服务启动后立即调用其自己的服务的操作?

发布于 2025-01-17 19:03:21 字数 242 浏览 4 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小情绪 2025-01-24 19:03:21

该服务可以通过 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文