Question: can these subscriptions be "unblocked"?
Closed this issue · 5 comments
My method calls are for some reason waiting for these subscriptions/paginations to be ready. Is there a way to have method calls NOT have to wait for these paginations?
Thanks!
Carlos
Is this happening client side?
Yes. The method call happens on the client and so do the subscriptions/paginations.
The method is a server method that goes out and fetches data... it is always waiting for the paginations to be done before starting.
Thanks
BTW, this Meteor doc seems to speak to the root of the matter... wondering if it sheds any light into this too, and if what we'd have to do is have the pagination package call this.unblock() before every subscription (which it manages internally I believe)... https://galaxy-guide.meteor.com/apm-managing-waittime.html#Using-this-unblock
According to the documentation link you sent this is standard behavior, in that all subscriptions block until ready.
If you wish to unblock this call you could do this in your server side publication, after installing meteorhacks:unblock
by overriding the transform_options
:
publishPagination(MyCollection, {
transform_options: function (filters, options) {
this.unblock();
return options;
}
});
Worked like a charm, thanks!!!