Merge pull request #501 from lbryio/update-git-timeout

updated timeout from 20 to 30 seconds
This commit is contained in:
Bill Bittner 2018-06-29 08:45:00 -07:00 committed by GitHub
commit 123d3a6b72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
const axios = require('axios');
const logger = require('winston');
const { apiHost, apiPort } = require('@config/lbryConfig');
const { apiHost, apiPort, getTimeout } = require('@config/lbryConfig');
const lbrynetUri = 'http://' + apiHost + ':' + apiPort;
const { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('../utils/googleAnalytics.js');
const handleLbrynetResponse = require('./utils/handleLbrynetResponse.js');
@ -31,7 +31,10 @@ module.exports = {
axios
.post(lbrynetUri, {
method: 'get',
params: { uri, timeout: 20 },
params: {
uri,
timeout: getTimeout || 30,
},
})
.then(response => {
sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now());