Skip to content

Commit c37dff1

Browse files
Updated configuration to set None as default domain (#351)
1 parent f7af834 commit c37dff1

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

src/conductor/asyncio_client/configuration/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def __init__(
154154
self.polling_interval = polling_interval or self._get_env_int(
155155
"CONDUCTOR_WORKER_POLL_INTERVAL", 100
156156
)
157-
self.domain = domain or os.getenv("CONDUCTOR_WORKER_DOMAIN", "default_domain")
157+
self.domain = domain or os.getenv("CONDUCTOR_WORKER_DOMAIN", None)
158158
self.polling_interval_seconds = polling_interval_seconds or self._get_env_int(
159159
"CONDUCTOR_WORKER_POLL_INTERVAL_SECONDS", 0
160160
)

src/conductor/client/configuration/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def __init__(
193193
self.polling_interval = polling_interval or self._get_env_float(
194194
"CONDUCTOR_WORKER_POLL_INTERVAL", 100
195195
)
196-
self.domain = domain or os.getenv("CONDUCTOR_WORKER_DOMAIN", "default_domain")
196+
self.domain = domain or os.getenv("CONDUCTOR_WORKER_DOMAIN", None)
197197
self.polling_interval_seconds = polling_interval_seconds or self._get_env_float(
198198
"CONDUCTOR_WORKER_POLL_INTERVAL_SECONDS", 0
199199
)

tests/unit/asyncio_client/test_configuration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def test_initialization_default():
1010
config = Configuration()
1111
assert config.server_url is not None
1212
assert config.polling_interval == 100
13-
assert config.domain == "default_domain"
13+
assert config.domain is None
1414
assert config.polling_interval_seconds == 0
1515
assert config.debug is False
1616

@@ -138,7 +138,7 @@ def test_get_worker_property_value_default():
138138
def test_get_worker_property_value_domain():
139139
config = Configuration()
140140
result = config.get_worker_property_value("domain", "mytask")
141-
assert result == "default_domain"
141+
assert result is None
142142

143143

144144
def test_get_worker_property_value_poll_interval_seconds():
@@ -226,7 +226,7 @@ def test_get_domain_with_task_type(monkeypatch):
226226
def test_get_domain_default():
227227
config = Configuration()
228228
result = config.get_domain("mytask")
229-
assert result == "default_domain"
229+
assert result is None
230230

231231

232232
def test_get_poll_interval_with_task_type(monkeypatch):

tests/unit/worker/test_sync_worker.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ def test_init_with_defaults(simple_execute_function):
9797

9898
assert worker.task_definition_name == "test_task"
9999
assert worker.poll_interval == 100
100-
assert worker.domain is not None
101-
assert worker.domain == "default_domain"
100+
assert worker.domain is None
102101
assert worker.worker_id is not None
103102
assert worker.execute_function == simple_execute_function
104103

tests/unit/worker/test_worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def test_init_with_defaults(simple_execute_function):
8989

9090
assert worker.task_definition_name == "test_task"
9191
assert worker.poll_interval == 100
92-
assert worker.domain == "default_domain"
92+
assert worker.domain is None
9393
assert worker.worker_id is not None
9494
assert worker.execute_function == simple_execute_function
9595

0 commit comments

Comments
 (0)