From ba0bcf9fb8046c4ed05745b97f21402c20114af3 Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Thu, 13 Apr 2023 14:41:08 -0400 Subject: [PATCH] feat: update datalayer request middleware to 5 min timeout --- package.json | 2 +- src/datalayer/persistance.js | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f61b4970..356a0f0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "climate-warehouse", - "version": "1.2.26", + "version": "1.2.27", "private": true, "bin": "build/server.js", "type": "module", diff --git a/src/datalayer/persistance.js b/src/datalayer/persistance.js index 2d5d6da6..2c0bcff3 100644 --- a/src/datalayer/persistance.js +++ b/src/datalayer/persistance.js @@ -3,7 +3,6 @@ import _ from 'lodash'; import fs from 'fs'; import path from 'path'; import request from 'request-promise'; -import os from 'os'; import { getConfig } from '../utils/config-loader'; import { decodeHex } from '../utils/datalayer-utils'; import fullNode from './fullNode'; @@ -15,7 +14,7 @@ import wallet from './wallet'; import { Organization } from '../models'; import { logger } from '../config/logger.cjs'; -import {getChiaRoot} from "../utils/chia-root.js" +import { getChiaRoot } from '../utils/chia-root.js'; logger.info('climate-warehouse:datalayer:persistance'); @@ -24,7 +23,7 @@ process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0; const CONFIG = getConfig().APP; const getBaseOptions = () => { - const chiaRoot = getChiaRoot() + const chiaRoot = getChiaRoot(); const certFile = path.resolve( `${chiaRoot}/config/ssl/data_layer/private_data_layer.crt`, ); @@ -36,7 +35,7 @@ const getBaseOptions = () => { method: 'POST', cert: fs.readFileSync(certFile), key: fs.readFileSync(keyFile), - timeout: 60000, + timeout: 300000, }; return baseOptions;