Compare commits

...

1 Commits

Author SHA1 Message Date
Taylor McKinnon 4a98e292cd impr(UTAPI-73): Wait for ready before returning RedisCache.connect() 2022-05-06 13:09:11 -07:00
1 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,10 @@ class RedisCache {
moduleLogger.debug('Connecting to redis...');
this._redis = new RedisClient(this._options);
this._redis.connect();
return true;
return new Promise((resolve, reject) => {
this._redis.once('ready', () => resolve(true));
this._redis.once('error', error => reject(error));
});
}
async disconnect() {