Compare commits
1 commit
049ae8fc56
...
193778ebf1
| Author | SHA1 | Date | |
|---|---|---|---|
| 193778ebf1 |
1 changed files with 4 additions and 4 deletions
|
|
@ -2,14 +2,14 @@ import os
|
|||
|
||||
from granian import Granian
|
||||
from granian.constants import Interfaces, Loops
|
||||
from pydantic import BaseModel, PositiveInt
|
||||
from pydantic import BaseModel, Field
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class WorkersSettings(BaseModel):
|
||||
per_core: PositiveInt = 1
|
||||
max: PositiveInt | None = None
|
||||
exact: PositiveInt | None = None
|
||||
per_core: int = Field(1, ge=1)
|
||||
max: int | None = Field(None, ge=1)
|
||||
exact: int | None = Field(None, ge=1)
|
||||
|
||||
@property
|
||||
def count(self) -> int:
|
||||
|
|
|
|||
Loading…
Reference in a new issue