How to use the taskcluster-client.PulseConnection function in taskcluster-client

To help you get started, we’ve selected a few taskcluster-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github taskcluster / taskcluster / libraries / testing / src / pulse.js View on Github external
var PulseTestReceiver = function(credentials, mocha) {
  var that = this;
  this._connection = new taskcluster.PulseConnection(credentials);
  this._listeners = null;
  this._promisedMessages = null;

  // **Note**, the functions below are mocha hooks. Ie. they are called by
  // mocha, that is also the reason that `PulseTestReceiver` only works in the
  // context of a mocha test.  Note that we assume mocha is in "tdd" mode.
  if (!mocha) {
    mocha = require('mocha');
  }

  // Before all tests we ask the pulseConnection to connect, why not it offers
  // slightly better performance, and we want tests to run fast
  mocha.suiteSetup(function() {
    return that._connection.connect();
  });
github taskcluster / taskcluster / services / auth / src / main.js View on Github external
setup: async ({cfg}) => {
      return new taskcluster.PulseConnection(cfg.pulse);
    },
  },