new(whatsapp.gblib): Auto-create WhatsApp templates from articles in .docx.

This commit is contained in:
Rodrigo Rodriguez 2024-08-06 08:36:42 -03:00
parent e8d0317f82
commit ca29e2df6c
2 changed files with 10 additions and 0 deletions

View file

@ -652,6 +652,12 @@ export class GBVMService extends GBService {
}
};
const sleep = async (ms) => {
return new Promise(resolve => {
setTimeout(resolve, ms);
});
}
const TOYAML = (json) => {
const doc = new YAML.Document();
doc.contents = json;

View file

@ -420,6 +420,8 @@ export class KeywordsExpressions {
__res = await sys.getHttp ({pid: pid, file: host + '${url}' + '?' + pageVariable + '=' + __page + '&' + limitVariable + '=' + limit, addressOrHeaders: headers, httpUsername, httpPs})
},{ retries: 5});
await sleep(100);
res = __res
list1 = res.data
@ -435,6 +437,8 @@ export class KeywordsExpressions {
__res = await sys.getHttp ({pid: pid, file: host + '${url}' + '/' + detail_id, addressOrHeaders: headers, httpUsername, httpPs})
},{ retries: 5});
await sleep(200);
res = __res
items1[j1] = res.data