mirror of
https://github.com/yavook/kiwi-simple-metrics.git
synced 2024-11-21 23:32:59 +00:00
default values for lists in SETTINGS
This commit is contained in:
parent
4205b04b05
commit
61ede82f36
1 changed files with 4 additions and 4 deletions
|
@ -1,8 +1,8 @@
|
||||||
import math
|
import math
|
||||||
from typing import Any, Literal
|
from typing import Any, Literal
|
||||||
|
|
||||||
from pydantic import (BaseModel, DirectoryPath, Field, FieldValidationInfo,
|
from pydantic import (BaseModel, DirectoryPath, FieldValidationInfo, FilePath,
|
||||||
FilePath, field_validator)
|
field_validator)
|
||||||
|
|
||||||
|
|
||||||
class MetricSettings(BaseModel):
|
class MetricSettings(BaseModel):
|
||||||
|
@ -81,7 +81,7 @@ class DiskMS(MetricSettings):
|
||||||
count: int | None = 1
|
count: int | None = 1
|
||||||
|
|
||||||
# paths to check for disk space
|
# paths to check for disk space
|
||||||
paths: list[DirectoryPath] = Field(default_factory=list)
|
paths: list[DirectoryPath] = [DirectoryPath("/")]
|
||||||
|
|
||||||
|
|
||||||
class ExternalMS(MetricSettings):
|
class ExternalMS(MetricSettings):
|
||||||
|
@ -89,7 +89,7 @@ class ExternalMS(MetricSettings):
|
||||||
threshold: float = 0
|
threshold: float = 0
|
||||||
|
|
||||||
# path to executable files
|
# path to executable files
|
||||||
executables: list[FilePath] = Field(default_factory=list)
|
executables: list[FilePath] = []
|
||||||
|
|
||||||
# wait at most this many seconds for each executable
|
# wait at most this many seconds for each executable
|
||||||
timeout: int = 60
|
timeout: int = 60
|
||||||
|
|
Loading…
Reference in a new issue