fix(basic.gblib): Allow MERGE keyword in storage #380. @othonlima
This commit is contained in:
parent
4ff3cbafd5
commit
540e275d65
2 changed files with 14 additions and 4 deletions
|
@ -326,7 +326,8 @@ export class GBVMService extends GBService {
|
||||||
dialectOptions: {
|
dialectOptions: {
|
||||||
options: {
|
options: {
|
||||||
trustServerCertificate: true,
|
trustServerCertificate: true,
|
||||||
encrypt: encrypt
|
encrypt: encrypt,
|
||||||
|
requestTimeout: 120 * 1000
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pool: {
|
pool: {
|
||||||
|
|
|
@ -659,7 +659,7 @@ export class SystemKeywords {
|
||||||
*/
|
*/
|
||||||
public async saveToStorageBatch({ pid, table, rows }): Promise<void> {
|
public async saveToStorageBatch({ pid, table, rows }): Promise<void> {
|
||||||
const { min } = await DialogKeywords.getProcessInfo(pid);
|
const { min } = await DialogKeywords.getProcessInfo(pid);
|
||||||
GBLog.info(`BASIC: Saving to storage '${table}' (SAVE).`);
|
GBLog.info(`BASIC: Saving batch to storage '${table}' (SAVE).`);
|
||||||
|
|
||||||
const definition = this.getTableFromName(table, min);
|
const definition = this.getTableFromName(table, min);
|
||||||
|
|
||||||
|
@ -2056,7 +2056,16 @@ export class SystemKeywords {
|
||||||
|
|
||||||
header = Object.keys(t.fieldRawAttributesMap);
|
header = Object.keys(t.fieldRawAttributesMap);
|
||||||
if (!this.cachedMerge[pid][file]) {
|
if (!this.cachedMerge[pid][file]) {
|
||||||
rows = await t.findAll({});
|
await retry(
|
||||||
|
async (bail) => {
|
||||||
|
rows = await t.findAll({});
|
||||||
|
},
|
||||||
|
{
|
||||||
|
retries: 5,
|
||||||
|
onRetry: (err) => { GBLog.error(`MERGE: Retrying SELECT ALL on table: ${err.message}.`); }
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rows = this.cachedMerge[pid][file];
|
rows = this.cachedMerge[pid][file];
|
||||||
|
|
Loading…
Add table
Reference in a new issue