Skip to content

Commit

Permalink
Constraints on some config parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
bennybp committed Jan 31, 2025
1 parent 34fafe6 commit 4901483
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions qcfractal/qcfractal/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,17 @@ class FractalConfig(ConfigBase):
service_frequency: int = Field(60, description="The frequency at which to update services (in seconds)")
max_active_services: int = Field(20, description="The maximum number of concurrent active services")
heartbeat_frequency: int = Field(
1800, description="The frequency (in seconds) to check the heartbeat of compute managers"
1800,
description="The frequency (in seconds) to check the heartbeat of compute managers",
gt=0,
)
heartbeat_frequency_jitter: int = Field(
0.1, description="Jitter fraction to be applied to the heartbeat frequency", ge=0
)
heartbeat_frequency_jitter: int = Field(0.1, description="Jitter fraction to be applied to the heartbeat frequency")
heartbeat_max_missed: int = Field(
5,
description="The maximum number of heartbeats that a compute manager can miss. If more are missed, the worker is considered dead",
ge=0,
)

# Access logging
Expand Down
1 change: 1 addition & 0 deletions qcfractalcompute/qcfractalcompute/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ class FractalComputeConfig(BaseModel):
"update_frequency_jitter represents a fraction of the update_frequency to allow as a max. "
"Ie, update_frequency=60, and jitter=0.1, updates will happen between 54 and 66 seconds. "
"This helps with spreading out server load.",
ge=0,
)

max_idle_time: Optional[int] = Field(
Expand Down

0 comments on commit 4901483

Please sign in to comment.