@obisey/nest 0.1.25 → 0.1.26

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obisey/nest",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "NestJS utilities and base classes by Obisey",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -205,12 +205,15 @@ function BaseService(modelo) {
205
205
  const idsToSave = resultado.map((n) => (0, getModelId_1.getModelId)(n));
206
206
  console.log(`[ACTUALIZAR-IDS] ${modelo}: IDs=[${idsToSave}]`);
207
207
  // SAVE INDIVIDUAL ITEMS
208
- const promises = resultado.map((item) => {
208
+ console.log(`[ACTUALIZAR-SAVING-ITEMS] ${modelo}: about to save ${resultado.length} items`);
209
+ const promises = resultado.map((item, idx) => {
209
210
  const id = (0, getModelId_1.getModelId)(item);
210
211
  const plainData = item.get({ plain: true });
212
+ console.log(`[ACTUALIZAR-ITEM-${id}] ${modelo}: saving to pkey=${pkey(id).substring(0, 40)}`);
211
213
  return this.redis.hSet(pkey(id), 'item', JSON.stringify(plainData));
212
214
  });
213
215
  return Promise.all(promises).then(() => {
216
+ console.log(`[ACTUALIZAR-ALL-SAVED] ${modelo}: items saved, saving IDs`);
214
217
  return this.redis.hSet(nkey, peticion, JSON.stringify(idsToSave));
215
218
  });
216
219
  });