Skip to content

Commit

Permalink
Make scheduler configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik4949 committed Jul 5, 2024
1 parent 064ed9b commit f9581a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion superduperdb/base/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@ class CronTab(BaseConfig):

uri: t.Optional[str] = None

@dc.dataclass
class SchedulerConfig(BaseConfig):
"""Describes the configuration for scheduler service
:param uri: The URI for the scheduler service.
"""

uri: t.Optional[str] = None # None implies local mode


@dc.dataclass
class Compute(BaseConfig):
Expand Down Expand Up @@ -196,7 +205,7 @@ class Cluster(BaseConfig):
vector_search: VectorSearch = dc.field(default_factory=VectorSearch)
rest: Rest = dc.field(default_factory=Rest)
cdc: CDCConfig = dc.field(default_factory=CDCConfig)

scheduler: SchedulerConfig = dc.field(default_factory=SchedulerConfig)

class LogLevel(str, Enum):
"""Enumerate log severity level # noqa."""
Expand Down
2 changes: 1 addition & 1 deletion superduperdb/misc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _request_server(
elif service == 'vector_search':
service_uri = CFG.cluster.vector_search.uri
elif service == 'scheduler':
service_uri = 'http://localhost:8181'
service_uri = CFG.cluster.scheduler.uri
else:
raise NotImplementedError(f'Unknown service {service}')

Expand Down

0 comments on commit f9581a0

Please sign in to comment.