upgrade wakatime-cli to v10.4.1

This commit is contained in:
Alan Hamlett 2018-10-05 00:06:02 -07:00
parent d1455e77a8
commit 5cf2c8f7ac
3 changed files with 5 additions and 3 deletions

View file

@ -1,7 +1,7 @@
__title__ = 'wakatime' __title__ = 'wakatime'
__description__ = 'Common interface to the WakaTime api.' __description__ = 'Common interface to the WakaTime api.'
__url__ = 'https://github.com/wakatime/wakatime' __url__ = 'https://github.com/wakatime/wakatime'
__version_info__ = ('10', '4', '0') __version_info__ = ('10', '4', '1')
__version__ = '.'.join(__version_info__) __version__ = '.'.join(__version_info__)
__author__ = 'Alan Hamlett' __author__ = 'Alan Hamlett'
__author_email__ = 'alan@wakatime.com' __author_email__ = 'alan@wakatime.com'

View file

@ -46,11 +46,11 @@ Default is 2MB.
""" """
MAX_FILE_SIZE_SUPPORTED = 2000000 MAX_FILE_SIZE_SUPPORTED = 2000000
""" Default number of offline heartbeats to sync before exiting.""" """ Default limit of number of offline heartbeats to sync before exiting."""
DEFAULT_SYNC_OFFLINE_ACTIVITY = 100 DEFAULT_SYNC_OFFLINE_ACTIVITY = 100
""" Number of heartbeats per api request. """ Number of heartbeats per api request.
Even when sending more heartbeats, this is the number of heartbeats sent per Even when sending more heartbeats, this is the number of heartbeats sent per
individual https request to the WakaTime API. individual https request to the WakaTime API.
""" """
HEARTBEATS_PER_REQUEST = 10 HEARTBEATS_PER_REQUEST = 50

View file

@ -14,6 +14,7 @@ from __future__ import print_function
import logging import logging
import os import os
import sys import sys
import time
import traceback import traceback
pwd = os.path.dirname(os.path.abspath(__file__)) pwd = os.path.dirname(os.path.abspath(__file__))
@ -76,6 +77,7 @@ def execute(argv=None):
if retval == SUCCESS: if retval == SUCCESS:
queue = Queue(args, configs) queue = Queue(args, configs)
for offline_heartbeats in queue.pop_many(args.sync_offline_activity): for offline_heartbeats in queue.pop_many(args.sync_offline_activity):
time.sleep(1)
retval = send_heartbeats(offline_heartbeats, args, configs) retval = send_heartbeats(offline_heartbeats, args, configs)
if retval != SUCCESS: if retval != SUCCESS:
break break