Compare commits
2 commits
193778ebf1
...
049ae8fc56
| Author | SHA1 | Date | |
|---|---|---|---|
| 049ae8fc56 | |||
| 7b65d8c9b5 |
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, Field
|
||||
from pydantic import BaseModel, PositiveInt
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class WorkersSettings(BaseModel):
|
||||
per_core: int = Field(1, ge=1)
|
||||
max: int | None = Field(None, ge=1)
|
||||
exact: int | None = Field(None, ge=1)
|
||||
per_core: PositiveInt = 1
|
||||
max: PositiveInt | None = None
|
||||
exact: PositiveInt | None = None
|
||||
|
||||
@property
|
||||
def count(self) -> int:
|
||||
|
|
|
|||
Loading…
Reference in a new issue