ffxsam
ffxsam

Reputation: 27793

Meteor method waiting for subscriptions that aren't there

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.

Upvotes: 1

Views: 88

Answers (1)

tscizzle
tscizzle

Reputation: 12261

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/

Upvotes: 0

Related Questions