INNER CODE UNIT · JavaScript

Promise

pnxtech/hydra · index.js:380

    return new Promise((resolve) => {
      clearInterval(this.presenceTimerInteval);
      clearInterval(this.healthTimerInterval);

      const promises = [];
      if (!this.testMode) {
        this._logMessage('error', 'Service is shutting down.');
        this.redisdb.batch()
          .expire(`${redisPreKey}:${this.serviceName}:${this.instanceID}:health`, KEY_EXPIRATION_TTL)
          .expire(`${redisPreKey}:${this.serviceName}:${this.instanceID}:health:log`, ONE_WEEK_IN_SECONDS)
          .exec();

        if (this.mcMessageChannelClient) {
          promises.push(this.mcMessageChannelClient.quitAsync());
        }
        if (this.mcDirectMessageChannelClient) {
          promises.push(this.mcDirectMessageChannelClient.quitAsync());
        }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…