Skip to content

Commit 151e4d0

Browse files
authored
Conductor Key in DBOSConfig (#474)
1 parent 99997e9 commit 151e4d0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

dbos/_dbos.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ def __init__(
335335
self._background_threads: List[threading.Thread] = []
336336
self.conductor_url: Optional[str] = conductor_url
337337
self.conductor_key: Optional[str] = conductor_key
338+
if config.get("conductor_key"):
339+
self.conductor_key = config.get("conductor_key")
338340
self.conductor_websocket: Optional[ConductorWebsocket] = None
339341
self._background_event_loop: BackgroundEventLoop = BackgroundEventLoop()
340342
self._active_workflows_set: set[str] = set()

dbos/_dbos_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class DBOSConfig(TypedDict, total=False):
3636
dbos_system_schema (str): Schema name for DBOS system tables. Defaults to "dbos".
3737
enable_otlp (bool): If True, enable built-in DBOS OTLP tracing and logging.
3838
system_database_engine (sa.Engine): A custom system database engine. If provided, DBOS will not create an engine but use this instead.
39+
conductor_key (str): An API key for DBOS Conductor. Pass this in to connect your process to Conductor.
3940
"""
4041

4142
name: str
@@ -55,6 +56,7 @@ class DBOSConfig(TypedDict, total=False):
5556
dbos_system_schema: Optional[str]
5657
enable_otlp: Optional[bool]
5758
system_database_engine: Optional[sa.Engine]
59+
conductor_key: Optional[str]
5860

5961

6062
class RuntimeConfig(TypedDict, total=False):

0 commit comments

Comments
 (0)