Skip to content

Commit

Permalink
Merge branch 'redis_storage_improvements' into sdks-7658
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed Nov 30, 2023
2 parents 42bd5bf + d2d7f2f commit e4aaadc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/storages/inRedis/RedisAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class RedisAdapter extends ioredis {
private _notReadyCommandsQueue?: IRedisCommand[];
private _runningCommands: ISet<Promise<any>>;

constructor(log: ILogger, storageSettings?: Record<string, any>) {
constructor(log: ILogger, storageSettings: Record<string, any> = {}) {
const options = RedisAdapter._defineOptions(storageSettings);
// Call the ioredis constructor
super(...RedisAdapter._defineLibrarySettings(options));
Expand Down Expand Up @@ -103,7 +103,7 @@ export class RedisAdapter extends ioredis {
// For handling pending commands on disconnect, add to the set and remove once finished.
// On sync commands there's no need, only thenables.
instance._runningCommands.add(result);
const cleanUpRunningCommandsCb = () => {
const cleanUpRunningCommandsCb = function () {
instance._runningCommands.delete(result);
};
// Both success and error remove from queue.
Expand Down Expand Up @@ -205,7 +205,7 @@ export class RedisAdapter extends ioredis {
/**
* Parses the options into what we care about.
*/
static _defineOptions({ connectionTimeout, operationTimeout, url, host, port, db, pass, tls }: Record<string, any> = {}) {
static _defineOptions({ connectionTimeout, operationTimeout, url, host, port, db, pass, tls }: Record<string, any>) {
const parsedOptions = {
connectionTimeout, operationTimeout, url, host, port, db, pass, tls
};
Expand Down

0 comments on commit e4aaadc

Please sign in to comment.