File tree Expand file tree Collapse file tree 1 file changed +31
-9
lines changed Expand file tree Collapse file tree 1 file changed +31
-9
lines changed Original file line number Diff line number Diff line change @@ -89,11 +89,26 @@ export class SyncedMap<V> {
8989
9090 try {
9191 do {
92- const remoteItems = await this . client . hScan (
93- getTimeoutRedisCommandOptions ( this . timeoutMs ) ,
94- this . keyPrefix + this . redisKey ,
95- cursor ,
96- hScanOptions ,
92+ const remoteItems = await redisErrorHandler (
93+ 'SyncedMap.initialSync(), operation: hScan ' +
94+ this . syncChannel +
95+ ' ' +
96+ this . timeoutMs +
97+ 'ms' +
98+ ' ' +
99+ this . keyPrefix +
100+ ' ' +
101+ this . redisKey +
102+ ' ' +
103+ cursor +
104+ ' ' +
105+ this . querySize ,
106+ this . client . hScan (
107+ getTimeoutRedisCommandOptions ( this . timeoutMs ) ,
108+ this . keyPrefix + this . redisKey ,
109+ cursor ,
110+ hScanOptions ,
111+ ) ,
97112 ) ;
98113 for ( const { field, value } of remoteItems . tuples ) {
99114 if ( this . filterKeys ( field ) ) {
@@ -118,10 +133,17 @@ export class SyncedMap<V> {
118133 let remoteKeys : string [ ] = [ ] ;
119134 try {
120135 do {
121- const remoteKeysPortion = await this . client . scan (
122- getTimeoutRedisCommandOptions ( this . timeoutMs ) ,
123- cursor ,
124- scanOptions ,
136+ const remoteKeysPortion = await redisErrorHandler (
137+ 'SyncedMap.cleanupKeysNotInRedis(), operation: scan ' +
138+ this . timeoutMs +
139+ 'ms' +
140+ ' ' +
141+ this . keyPrefix ,
142+ this . client . scan (
143+ getTimeoutRedisCommandOptions ( this . timeoutMs ) ,
144+ cursor ,
145+ scanOptions ,
146+ ) ,
125147 ) ;
126148 remoteKeys = remoteKeys . concat ( remoteKeysPortion . keys ) ;
127149 cursor = remoteKeysPortion . cursor ;
You can’t perform that action at this time.
0 commit comments