(core) Add logging of errors whenever ProxyAgent is used, and a test for it.

Summary:
Also:
- Move ProxyAgent to from app/server/utils to app/server/lib, which is
  the more usual place for such classes.
- Refactor a helper (delayAbort) that node was reporting a leak in.

Test Plan: Added a test case, and tested manually.

Reviewers: JakubSerafin

Reviewed By: JakubSerafin

Subscribers: JakubSerafin, paulfitz

Differential Revision: https://phab.getgrist.com/D3897
This commit is contained in:
Dmitry S
2023-05-17 09:59:35 -04:00
parent 84854b7cfa
commit be5cb9124a
6 changed files with 106 additions and 34 deletions

View File

@@ -7,7 +7,7 @@ import * as path from 'path';
import * as tmp from 'tmp';
import * as fse from 'fs-extra';
import log from 'app/server/lib/log';
import {proxyAgent} from "app/server/utils/ProxyAgent";
import {proxyAgent} from "app/server/lib/ProxyAgent";
import chunk = require('lodash/chunk');
import fromPairs = require('lodash/fromPairs');
import zipObject = require('lodash/zipObject');