increase default timeout to 60 seconds
This commit is contained in:
parent
18f588104d
commit
984a8ab62a
|
@ -49,7 +49,7 @@ optional arguments:
|
||||||
--logfile LOGFILE defaults to ~/.wakatime.log
|
--logfile LOGFILE defaults to ~/.wakatime.log
|
||||||
--apiurl API_URL heartbeats api url; for debugging with a local server
|
--apiurl API_URL heartbeats api url; for debugging with a local server
|
||||||
--timeout TIMEOUT number of seconds to wait when sending heartbeats to
|
--timeout TIMEOUT number of seconds to wait when sending heartbeats to
|
||||||
api
|
api; defaults to 60 seconds
|
||||||
--config CONFIG defaults to ~/.wakatime.conf
|
--config CONFIG defaults to ~/.wakatime.conf
|
||||||
--verbose turns on debug messages in log file
|
--verbose turns on debug messages in log file
|
||||||
--version show program's version number and exit
|
--version show program's version number and exit
|
||||||
|
|
|
@ -490,7 +490,7 @@ class BaseTestCase(utils.TestCase):
|
||||||
self.patched['wakatime.offlinequeue.Queue.push'].assert_not_called()
|
self.patched['wakatime.offlinequeue.Queue.push'].assert_not_called()
|
||||||
self.patched['wakatime.offlinequeue.Queue.pop'].assert_called_once_with()
|
self.patched['wakatime.offlinequeue.Queue.pop'].assert_called_once_with()
|
||||||
|
|
||||||
self.patched['wakatime.packages.requests.adapters.HTTPAdapter.send'].assert_called_once_with(ANY, cert=None, proxies={'https': 'localhost:1234'}, stream=False, timeout=30, verify=True)
|
self.patched['wakatime.packages.requests.adapters.HTTPAdapter.send'].assert_called_once_with(ANY, cert=None, proxies={'https': 'localhost:1234'}, stream=False, timeout=60, verify=True)
|
||||||
|
|
||||||
def test_entity_type_domain(self):
|
def test_entity_type_domain(self):
|
||||||
response = Response()
|
response = Response()
|
||||||
|
|
|
@ -158,7 +158,8 @@ def parseArguments():
|
||||||
parser.add_argument('--apiurl', dest='api_url',
|
parser.add_argument('--apiurl', dest='api_url',
|
||||||
help='heartbeats api url; for debugging with a local server')
|
help='heartbeats api url; for debugging with a local server')
|
||||||
parser.add_argument('--timeout', dest='timeout', type=int,
|
parser.add_argument('--timeout', dest='timeout', type=int,
|
||||||
help='number of seconds to wait when sending heartbeats to api')
|
help='number of seconds to wait when sending heartbeats to api; '+
|
||||||
|
'defaults to 60 seconds')
|
||||||
parser.add_argument('--config', dest='config',
|
parser.add_argument('--config', dest='config',
|
||||||
help='defaults to ~/.wakatime.conf')
|
help='defaults to ~/.wakatime.conf')
|
||||||
parser.add_argument('--verbose', dest='verbose', action='store_true',
|
parser.add_argument('--verbose', dest='verbose', action='store_true',
|
||||||
|
@ -307,7 +308,7 @@ def send_heartbeat(project=None, branch=None, hostname=None, stats={}, key=None,
|
||||||
if not api_url:
|
if not api_url:
|
||||||
api_url = 'https://api.wakatime.com/api/v1/heartbeats'
|
api_url = 'https://api.wakatime.com/api/v1/heartbeats'
|
||||||
if not timeout:
|
if not timeout:
|
||||||
timeout = 30
|
timeout = 60
|
||||||
log.debug('Sending heartbeat to api at %s' % api_url)
|
log.debug('Sending heartbeat to api at %s' % api_url)
|
||||||
data = {
|
data = {
|
||||||
'time': timestamp,
|
'time': timestamp,
|
||||||
|
|
Loading…
Reference in New Issue