1

I have a Meteor method generateUserHash which just passes an ID to Intercom to get back a user hash:

export const generateUserHash = new ValidatedMethod({
  name: 'generateUserHash',

  validate() {},

  run() {
    if (!Meteor.isServer) return;

    if (!this.userId) throw new Meteor.Error('no-user-id');

    return SecureMode.userHash({
      identifier: this.userId,
      secretKey: Meteor.settings.intercom.secretKey,
    });
  },
});

According to Kadira:

enter image description here

I don't understand why it's waiting for all those subscriptions when those are nowhere inside the method.

ffxsam
  • 26,428
  • 32
  • 94
  • 144

1 Answers1

0

A method will wait on subscriptions even if the subscriptions are not in that method.

A good post on wait time is here: https://meteorhacks.com/understanding-meteor-wait-time-and-this-unblock/

tscizzle
  • 11,191
  • 15
  • 54
  • 88
  • The link is dead. There is the web archive link: https://web.archive.org/web/20160320023635/https://meteorhacks.com/understanding-meteor-wait-time-and-this-unblock/ – ivan133 Sep 30 '18 at 10:10