undr.constants#

Constants used throughout the codebase.

Overview#

Attributes#

CHUNK_SIZE

Buffer size in bytes for file reads.

CONSUMER_POLL_PERIOD

Sleep duration for msssage readers.

DECOMPRESS_SUFFIX

Suffix indicating that a file is being decompressed.

DEFAULT_TIMEOUT

Server timeout, can be overriden in settings TOML files.

DOWNLOAD_SUFFIX

Suffix indicating that a file is being downloaded.

LRU_CACHE_MAXSIZE

Number of index files cached by the load function.

SPEED_SAMPLES

Number of samples used to smooth the speed measurement (sliding window).

STREAM_CHUNK_THRESHOLD

Below this number, files are download in one chunk instead of several to boost performance.

WORKER_POLL_PERIOD

Sleep duration for wworkers when the task queue is empty.

Module Contents#

undr.constants.CHUNK_SIZE: int = 65536#

Buffer size in bytes for file reads.

undr.constants.CONSUMER_POLL_PERIOD: float = 0.1#

Sleep duration for msssage readers.

undr.constants.DECOMPRESS_SUFFIX: str = '.decompress'#

Suffix indicating that a file is being decompressed.

undr.constants.DEFAULT_TIMEOUT: float = 60.0#

Server timeout, can be overriden in settings TOML files.

undr.constants.DOWNLOAD_SUFFIX: str = '.download'#

Suffix indicating that a file is being downloaded.

undr.constants.LRU_CACHE_MAXSIZE: int = 128#

Number of index files cached by the load function.

undr.constants.SPEED_SAMPLES: int = 30#

Number of samples used to smooth the speed measurement (sliding window).

undr.constants.STREAM_CHUNK_THRESHOLD: int = 64#

Below this number, files are download in one chunk instead of several to boost performance.

undr.constants.WORKER_POLL_PERIOD: float = 0.02#

Sleep duration for wworkers when the task queue is empty.