New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service dependencies
option
#102
Comments
Thank you! |
@tinchoz49 I checked it. If you |
maybe we can define a hook method Something like this: // moleculer.config.js
module.exports = {
namespace: 'dev',
nodeID: 'node-' + process.pid,
waitForServices: ['greeter-two'],
...
}; |
@tinchoz49 I'd sugest something like |
I vote to // posts.service.js
module.exports = {
name: "posts",
dependencies: ["users", "comments"]
....
} In this case the broker will call the "posts" service |
I like the suggestion! my vote for |
It doesn't make sense to fire I'm just wondering if theres interdependent services, for example A <-> B. This scenario will be blocked (if publishing to the network depends on started callback), yet, you can't accept calls if started wasn't called, because some initialization might be pending. |
dependencies
option
After #112 it should support versioned services too. And need an internal settings for timeout: // posts.service.js
module.exports = {
name: "posts",
settings: {
$dependencyTimeout: 30000
},
dependencies: [
"likes", // shorthand w/o version
{ name: "users", version: 2 }, // with numeric version
{ name: "comments", version: "staging" } // with string version
]
....
} Default value of |
Done. Will be released in v0.11.2 (this week) |
thanks for making each day this library more awesome! |
Released in v0.11.2 |
Hi @icebob, as we talk, here is the repository:
https://github.com/tinchoz49/example-moleculer-wait-for-services
The text was updated successfully, but these errors were encountered: