mobiletto 1.1.22 → 1.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/util/redis.js +11 -3
package/package.json
CHANGED
package/util/redis.js
CHANGED
|
@@ -134,16 +134,24 @@ class MobilettoCache {
|
|
|
134
134
|
asyncFunc(key).then(
|
|
135
135
|
(val) => {
|
|
136
136
|
if (typeof val !== 'undefined') {
|
|
137
|
+
logger.debug(`applyToMatchingKeys: found key ${key} = ${val}`)
|
|
137
138
|
results.push(val)
|
|
139
|
+
} else {
|
|
140
|
+
logger.debug(`applyToMatchingKeys: found key with undefined value: ${key}`)
|
|
138
141
|
}
|
|
139
142
|
},
|
|
140
143
|
(e) => {
|
|
141
|
-
|
|
142
|
-
|
|
144
|
+
const message = `applyToMatchingKeys: error with key ${key}: ${e}`;
|
|
145
|
+
logger.error(message)
|
|
146
|
+
reject(message)
|
|
143
147
|
})
|
|
144
148
|
}
|
|
145
149
|
}, (err, matchCount) => {
|
|
146
|
-
if (err)
|
|
150
|
+
if (err) {
|
|
151
|
+
logger.error(`applyToMatchingKeys: error in final callback: ${err}`)
|
|
152
|
+
reject(err)
|
|
153
|
+
}
|
|
154
|
+
logger.error(`applyToMatchingKeys: resolving and returning ${results.length} results`)
|
|
147
155
|
resolve(results)
|
|
148
156
|
})
|
|
149
157
|
})
|