ANTA Settings
anta.settings
¶
Settings for ANTA.
DEFAULT_MAX_CONCURRENCY
module-attribute
¶
DEFAULT_MAX_CONCURRENCY = 50000
Default value for the maximum number of concurrent tests in the event loop.
DEFAULT_NOFILE
module-attribute
¶
DEFAULT_NOFILE = 16384
Default value for the maximum number of open file descriptors for the ANTA process.
AntaRunnerSettings
¶
Bases: BaseSettings
Environment variables for configuring the ANTA runner.
When initialized, relevant environment variables are loaded. If not set, default values are used.
On POSIX systems, also adjusts the process soft limit based on the ANTA_NOFILE
environment variable
while respecting the system hard limit, meaning the new soft limit cannot exceed the system’s hard limit.
On non-POSIX systems (Windows), sets the limit to sys.maxsize
.
The adjusted limit is available with the file_descriptor_limit
property after initialization.
Attributes:
Name | Type | Description |
---|---|---|
nofile |
PositiveInt
|
Environment variable: ANTA_NOFILE The maximum number of open file descriptors for the ANTA process. Defaults to 16384. |
max_concurrency |
PositiveInt
|
Environment variable: ANTA_MAX_CONCURRENCY The maximum number of concurrent tests that can run in the event loop. Defaults to 50000. |
file_descriptor_limit
property
¶
file_descriptor_limit: PositiveInt
The maximum number of file descriptors available to the process.
model_post_init
¶
model_post_init(_context: Any) -> None
Post-initialization method to set the file descriptor limit for the current ANTA process.
Source code in anta/settings.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|