code: function MatrixScheduler(retryAlgorithm, queueAlgorithm) {
      this.retryAlgorithm = retryAlgorithm || MatrixScheduler.RETRY_BACKOFF_RATELIMIT;
      this.queueAlgorithm = queueAlgorithm || MatrixScheduler.QUEUE_MESSAGES;
      this._queues = {
          // queueName: [{
          //  event: MatrixEvent,  // event to send
          //  defer: Deferred,  // defer to resolve/reject at the END of the retries
          //  attempts: Number  // number of times we've called processFn
          // }, ...]
      };
      this._activeQueues = [];
      this._procFn = null;
  }
docs: set true to enable console logging. 
  Construct a scheduler for Matrix. Requires
  {@link module:scheduler~MatrixScheduler#setProcessFunction} to be provided
  with a way of processing events.
  @constructor
  @param {module:scheduler~retryAlgorithm} retryAlgorithm Optional. The retry
  algorithm to apply when determining when to try to send an event again.
  Defaults to {@link module:scheduler~MatrixScheduler.RETRY_BACKOFF_RATELIMIT}.
  @param {module:scheduler~queueAlgorithm} queueAlgorithm Optional. The queuing
  algorithm to apply when determining which events should be sent before the
  given event. Defaults to {@link module:scheduler~MatrixScheduler.QUEUE_MESSAGES}.