fix(all): TRUE multicloud.

This commit is contained in:
Rodrigo Rodriguez 2024-08-25 13:05:26 -03:00
parent 1a9abb1148
commit 666b1cb327

View file

@ -776,7 +776,7 @@ export class SystemKeywords {
await retry( await retry(
async bail => { async bail => {
await definition.bulkCreate(rowsDest); await definition.bulkCreate(rowsDest);
rowsDest = []; rowsDest = null;
}, },
{ {
retries: 5, retries: 5,
@ -2200,18 +2200,8 @@ export class SystemKeywords {
if (!this.cachedMerge[pid][file]) { if (!this.cachedMerge[pid][file]) {
await retry( await retry(
async bail => { async bail => {
let page = 0, rows = await t.findAll();
pageSize = 1000; GBLogEx.info(min, `MERGE cached: ${rows.length} row(s)...`);
let count = 0;
while (page === 0 || count === pageSize) {
const paged = await t.findAll({ offset: page * pageSize, limit: pageSize, subquery: false, where: {} });
rows = [...paged, ...rows];
page++;
count = paged.length;
GBLogEx.info(min, `MERGE cached: ${rows.length} from page: ${page}.`);
}
}, },
{ {
retries: 5, retries: 5,