mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
check if cli is installed before sending heartbeat
This commit is contained in:
parent
fa0a3aacb5
commit
5a4ac9c11d
@ -384,7 +384,7 @@ def process_queue(timestamp):
|
|||||||
|
|
||||||
# Prevent sending heartbeats more often than SEND_BUFFER_SECONDS
|
# Prevent sending heartbeats more often than SEND_BUFFER_SECONDS
|
||||||
now = int(time.time())
|
now = int(time.time())
|
||||||
if timestamp != LAST_HEARTBEAT['time'] and LAST_HEARTBEAT_SENT_AT > now - SEND_BUFFER_SECONDS:
|
if isCliInstalled() and timestamp != LAST_HEARTBEAT['time'] and LAST_HEARTBEAT_SENT_AT > now - SEND_BUFFER_SECONDS:
|
||||||
return
|
return
|
||||||
LAST_HEARTBEAT_SENT_AT = now
|
LAST_HEARTBEAT_SENT_AT = now
|
||||||
|
|
||||||
@ -421,7 +421,6 @@ class SendHeartbeatsThread(threading.Thread):
|
|||||||
self.include = SETTINGS.get('include', [])
|
self.include = SETTINGS.get('include', [])
|
||||||
self.hidefilenames = SETTINGS.get('hidefilenames')
|
self.hidefilenames = SETTINGS.get('hidefilenames')
|
||||||
self.proxy = SETTINGS.get('proxy')
|
self.proxy = SETTINGS.get('proxy')
|
||||||
self.python_binary = SETTINGS.get('python_binary')
|
|
||||||
|
|
||||||
self.heartbeat = heartbeat
|
self.heartbeat = heartbeat
|
||||||
self.has_extra_heartbeats = False
|
self.has_extra_heartbeats = False
|
||||||
|
Loading…
Reference in New Issue
Block a user