Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Commit bd02c80

Browse files
committed
add fallback server url
1 parent 67ac71f commit bd02c80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hatchet_sdk/loader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ def __init__(
2525

2626
class ClientConfig:
2727
logInterceptor: Logger
28-
fallback_host_port = "localhost:7070"
29-
fallback_server_url = "https://app.dev.hatchet-tools.com"
3028

3129
def __init__(
3230
self,
@@ -70,6 +68,8 @@ def __init__(self, directory: str):
7068
self.directory = directory
7169

7270
def load_client_config(self, defaults: ClientConfig) -> ClientConfig:
71+
fallback_server_url = "https://app.dev.hatchet-tools.com"
72+
7373
config_file_path = os.path.join(self.directory, "client.yaml")
7474
config_data: object = {"tls": {}}
7575

@@ -124,7 +124,7 @@ def get_config_value(key, env_var):
124124
server_url = host_port
125125
else:
126126
# extract host and port from token
127-
server_url, grpc_broadcast_address = get_addresses_from_jwt(token)
127+
server_url, grpc_broadcast_address = get_addresses_from_jwt(token) or fallback_server_url
128128
host_port = grpc_broadcast_address
129129

130130
if not tenant_id:

0 commit comments

Comments
 (0)