Skip to content

Commit

Permalink
feat: update datalayer request middleware to 5 min timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Apr 13, 2023
1 parent badcf6c commit ba0bcf9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "climate-warehouse",
"version": "1.2.26",
"version": "1.2.27",
"private": true,
"bin": "build/server.js",
"type": "module",
Expand Down
7 changes: 3 additions & 4 deletions src/datalayer/persistance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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');

Expand All @@ -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`,
);
Expand All @@ -36,7 +35,7 @@ const getBaseOptions = () => {
method: 'POST',
cert: fs.readFileSync(certFile),
key: fs.readFileSync(keyFile),
timeout: 60000,
timeout: 300000,
};

return baseOptions;
Expand Down

0 comments on commit ba0bcf9

Please sign in to comment.