This commit is contained in:
Barış Soner Uşaklı
2021-09-03 20:34:42 -04:00
committed by GitHub
parent 856ba78a5f
commit 0ce4b87d85
4 changed files with 57 additions and 6 deletions

View File

@@ -41,7 +41,11 @@ module.exports = function (module) {
return;
}
const batch = module.client.batch();
keys.forEach((k, i) => batch.hmset(k, data[i]));
keys.forEach((k, i) => {
if (Object.keys(data[i]).length) {
batch.hmset(k, data[i]);
}
});
await helpers.execBatch(batch);
cache.del(keys);
};