wechaty-puppet-matrix 0.0.48 → 0.0.49

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.
@@ -1378,14 +1378,14 @@ class Client extends events_1.EventEmitter {
1378
1378
  }
1379
1379
  async retryDownload(fn) {
1380
1380
  const maxRetries = 5;
1381
- const delayMs = 2000;
1381
+ const delayMs = 5000;
1382
1382
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
1383
1383
  try {
1384
1384
  const res = await fn();
1385
1385
  if (res?.url) {
1386
1386
  return res;
1387
1387
  }
1388
- wechaty_puppet_1.log.warn(PRE, 'download attempt %d/%d failed (no url in response)', attempt, maxRetries);
1388
+ wechaty_puppet_1.log.warn(PRE, 'download attempt %d/%d failed (no url in response): %s', attempt, maxRetries, JSON.stringify(res));
1389
1389
  }
1390
1390
  catch (e) {
1391
1391
  wechaty_puppet_1.log.warn(PRE, 'download attempt %d/%d error: %s', attempt, maxRetries, e);
@@ -1339,14 +1339,14 @@ class Client extends EventEmitter {
1339
1339
  }
1340
1340
  async retryDownload(fn) {
1341
1341
  const maxRetries = 5;
1342
- const delayMs = 2000;
1342
+ const delayMs = 5000;
1343
1343
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
1344
1344
  try {
1345
1345
  const res = await fn();
1346
1346
  if (res?.url) {
1347
1347
  return res;
1348
1348
  }
1349
- log.warn(PRE, 'download attempt %d/%d failed (no url in response)', attempt, maxRetries);
1349
+ log.warn(PRE, 'download attempt %d/%d failed (no url in response): %s', attempt, maxRetries, JSON.stringify(res));
1350
1350
  }
1351
1351
  catch (e) {
1352
1352
  log.warn(PRE, 'download attempt %d/%d error: %s', attempt, maxRetries, e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wechaty-puppet-matrix",
3
- "version": "0.0.48",
3
+ "version": "0.0.49",
4
4
  "description": "Puppet matrix for Wechaty",
5
5
  "type": "module",
6
6
  "typings": "./dist/esm/src/mod.d.ts",
@@ -1902,14 +1902,14 @@ class Client extends EventEmitter {
1902
1902
 
1903
1903
  private async retryDownload (fn: () => Promise<any>): Promise<any> {
1904
1904
  const maxRetries = 5
1905
- const delayMs = 2000
1905
+ const delayMs = 5000
1906
1906
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
1907
1907
  try {
1908
1908
  const res = await fn()
1909
1909
  if (res?.url) {
1910
1910
  return res
1911
1911
  }
1912
- log.warn(PRE, 'download attempt %d/%d failed (no url in response)', attempt, maxRetries)
1912
+ log.warn(PRE, 'download attempt %d/%d failed (no url in response): %s', attempt, maxRetries, JSON.stringify(res))
1913
1913
  } catch (e) {
1914
1914
  log.warn(PRE, 'download attempt %d/%d error: %s', attempt, maxRetries, e)
1915
1915
  }