I\'m performing a database count through a server method. Users can select how they want the count to be performed and then invoke the method.
My problem is that the cou
More of a work around, but if you had a reactive variable (could be an entry in the DB) that is a status of the method, and in the method itself, you check for that flag every chance you get for the status.
{
_id: "some id for the method", running: true
}
Pseudocode for method
Meteor.methods({
method: (_id) => {
status = getStatusForId(_id);
while(status) {
status = getStatusForId(_id);
}
}
});
Then to stop it, you just update that flag to be false and the method will stop as soon as it can.