2016-01-02 07:20:23 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
wakatime.constants
|
|
|
|
~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Constant variable definitions.
|
|
|
|
|
|
|
|
:copyright: (c) 2016 Alan Hamlett.
|
|
|
|
:license: BSD, see LICENSE for more details.
|
|
|
|
"""
|
|
|
|
|
2016-08-31 12:27:10 +00:00
|
|
|
""" Success
|
|
|
|
Exit code used when a heartbeat was sent successfully.
|
|
|
|
"""
|
2016-01-02 07:20:23 +00:00
|
|
|
SUCCESS = 0
|
2016-08-31 12:27:10 +00:00
|
|
|
|
|
|
|
""" Api Error
|
|
|
|
Exit code used when the WakaTime API returned an error.
|
|
|
|
"""
|
2016-01-02 07:20:23 +00:00
|
|
|
API_ERROR = 102
|
2016-08-31 12:27:10 +00:00
|
|
|
|
|
|
|
""" Config File Parse Error
|
|
|
|
Exit code used when the ~/.wakatime.cfg config file could not be parsed.
|
|
|
|
"""
|
2016-01-02 07:20:23 +00:00
|
|
|
CONFIG_FILE_PARSE_ERROR = 103
|
2016-08-31 12:27:10 +00:00
|
|
|
|
|
|
|
""" Auth Error
|
|
|
|
Exit code used when our api key is invalid.
|
|
|
|
"""
|
2016-01-25 22:49:37 +00:00
|
|
|
AUTH_ERROR = 104
|
2016-08-31 12:27:10 +00:00
|
|
|
|
|
|
|
""" Unknown Error
|
|
|
|
Exit code used when there was an unhandled exception.
|
|
|
|
"""
|
2016-03-06 22:07:47 +00:00
|
|
|
UNKNOWN_ERROR = 105
|
2016-08-31 12:27:10 +00:00
|
|
|
|
2017-05-15 08:15:47 +00:00
|
|
|
""" Connection Error
|
|
|
|
Exit code used when there was proxy or other problem connecting to the WakaTime
|
|
|
|
API servers.
|
|
|
|
"""
|
|
|
|
CONNECTION_ERROR = 107
|
|
|
|
|
2017-04-20 06:05:40 +00:00
|
|
|
""" Max file size supporting line number count stats.
|
|
|
|
Files larger than this in bytes will not have a line count stat for performance.
|
|
|
|
Default is 2MB.
|
|
|
|
"""
|
|
|
|
MAX_FILE_SIZE_SUPPORTED = 2000000
|
2018-09-21 05:16:48 +00:00
|
|
|
|
|
|
|
""" Default number of offline heartbeats to sync before exiting."""
|
|
|
|
DEFAULT_SYNC_OFFLINE_ACTIVITY = 100
|
|
|
|
|
|
|
|
""" Number of heartbeats per api request.
|
|
|
|
Even when sending more heartbeats, this is the number of heartbeats sent per
|
|
|
|
individual https request to the WakaTime API.
|
|
|
|
"""
|
|
|
|
HEARTBEATS_PER_REQUEST = 10
|