Closed macrozone closed 7 years ago
Nope, this only runs in the process which do the insert.
If you need things to happen on all meteor instances whenever something is inserted/updated/removed I suggest doing a find
on the dataset and observeChanges
the cursor
with added
etc. and trigger the actions then.
There might be other solutions also.
Closing this as answered, please correct me if I'm wrong.
Maybe some information for the archive ;-)
We used a lot of db observers on one of our projects (where this question here was relevant), but we noticed that it affects the memory consumption and performance of the db and the server if you have a lot of observers and the observed set is large.
We therefore using now more hooks then observers.
In general, there isn't a clear answer to what is the better solution, both solutions have down- and upsides.
If my apps runs on multiple process, does e.g. an insert on one process trigger the hook on the other instance as well?