@io-orkes/conductor-javascript 1.2.1-rc.4 → 1.2.2-rc.2

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.
package/dist/index.js CHANGED
@@ -2430,10 +2430,14 @@ var TaskRunner = class {
2430
2430
  return tasks;
2431
2431
  };
2432
2432
  this.updateTaskWithRetry = async (task, taskResult) => {
2433
+ const { workerID } = this.options;
2433
2434
  let retryCount = 0;
2434
2435
  while (retryCount < MAX_RETRIES) {
2435
2436
  try {
2436
- await this.taskResource.updateTask1(taskResult);
2437
+ await this.taskResource.updateTask1({
2438
+ ...taskResult,
2439
+ workerId: workerID
2440
+ });
2437
2441
  return;
2438
2442
  } catch (error) {
2439
2443
  this.errorHandler(error, task);
@@ -3896,8 +3900,16 @@ var baseOrkesConductorClient = (fetchFn, baseRequestHandler = defaultRequestHand
3896
3900
 
3897
3901
  // src/orkes/OrkesConductorClient.ts
3898
3902
  var import_node_fetch = __toESM(require("node-fetch"));
3903
+ var import_http = __toESM(require("http"));
3904
+ var import_https = __toESM(require("https"));
3905
+ var httpAgent = new import_http.default.Agent({ keepAlive: true });
3906
+ var httpsAgent = new import_https.default.Agent({ keepAlive: true });
3907
+ var agent = (_parsedURL) => _parsedURL.protocol == "http:" ? httpAgent : httpsAgent;
3899
3908
  var nodeFetchWrapper = async (input, options = {}) => {
3900
- const res = await (0, import_node_fetch.default)(input.toString(), options);
3909
+ const res = await (0, import_node_fetch.default)(input.toString(), {
3910
+ ...options,
3911
+ agent
3912
+ });
3901
3913
  return res;
3902
3914
  };
3903
3915
  var fetchCache = fetchCatchDns(