File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 11import logging
22import platform
3+ import uuid
34from typing import Final
45
56import aiohttp
67
8+ # THe instance ID is random and unique to a specific instance/run.
9+ # Helps identifying multiple instances behind the same public IP, can be useful to the Hilo/HQ devs for debugging purposes
10+ INSTANCE_ID : Final = str (uuid .uuid4 ())[24 :]
711LOG : Final = logging .getLogger (__package__ )
812DEFAULT_STATE_FILE : Final = "hilo_state.yaml"
913REQUEST_RETRY : Final = 9
4650
4751
4852# Request constants
49- DEFAULT_USER_AGENT : Final = f"PyHilo/{ PYHILO_VERSION } aiohttp/{ aiohttp .__version__ } Python/{ platform .python_version ()} "
53+ DEFAULT_USER_AGENT : Final = f"PyHilo/{ PYHILO_VERSION } - { INSTANCE_ID } aiohttp/{ aiohttp .__version__ } Python/{ platform .python_version ()} "
5054
5155
5256# NOTE(dvd): Not sure how to get new ones so I'm using the ones from my emulator
You can’t perform that action at this time.
0 commit comments