Skip to content

Commit

Permalink
Nico's feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed Nov 30, 2023
1 parent cc0faea commit d2d7f2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
1.12.0 (December XX, 2023)
- Added support for Flag Sets in "consumer" and "partial consumer" modes for Pluggable and Redis storages.
- Updated evaluation flow to log a warning when using flag sets that don't contain cached feature flags.
- Updated Redis adapter to handle timeouts and queueing of some missing commands: 'hincrby', 'popNRaw', and 'pipeline.exec'.
- Updated Redis adapter to handle timeouts and queueing of some missing commands: 'hincrby' and 'popNRaw'.
- Bugfixing - Fixed manager methods in consumer modes to return results in a promise when the SDK is not operational (not ready or destroyed).

1.11.0 (November 3, 2023)
Expand Down
6 changes: 3 additions & 3 deletions src/storages/inRedis/RedisAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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 @@ -86,7 +86,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 @@ -177,7 +177,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 d2d7f2f

Please sign in to comment.