Skip to content

Commit 7ed32af

Browse files
committed
ENH: Update emulators with parent question UUID
1 parent 6580487 commit 7ed32af

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

octue/cloud/emulators/_pub_sub.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020

2121

2222
class MockTopic(Topic):
23-
"""A mock topic that registers in a global messages dictionary rather than Google Pub/Sub."""
23+
"""A mock topic that registers in a global topics dictionary rather than Google Pub/Sub."""
2424

2525
def create(self, allow_existing=False):
26-
"""Register the topic in the global messages dictionary.
26+
"""Register the topic in the global topics dictionary.
2727
2828
:param bool allow_existing: if True, don't raise an error if the topic already exists
2929
:raise google.api_core.exceptions.AlreadyExists: if the topic already exists
@@ -38,7 +38,7 @@ def create(self, allow_existing=False):
3838
self._created = True
3939

4040
def delete(self):
41-
"""Delete the topic from the global messages dictionary.
41+
"""Delete the topic from the global topics dictionary.
4242
4343
:return None:
4444
"""
@@ -48,7 +48,7 @@ def delete(self):
4848
pass
4949

5050
def exists(self, timeout=10):
51-
"""Check if the topic exists in the global messages dictionary.
51+
"""Check if the topic exists in the global topics dictionary.
5252
5353
:param float timeout:
5454
:return bool:
@@ -326,6 +326,7 @@ def ask(
326326
allow_local_files=False,
327327
save_diagnostics="SAVE_DIAGNOSTICS_ON_CRASH",
328328
question_uuid=None,
329+
parent_question_uuid=None,
329330
push_endpoint=None,
330331
asynchronous=False,
331332
timeout=86400,
@@ -342,6 +343,7 @@ def ask(
342343
:param bool allow_local_files:
343344
:param str save_diagnostics:
344345
:param str|None question_uuid:
346+
:param str|None parent_question_uuid:
345347
:param str|None push_endpoint:
346348
:param bool asynchronous:
347349
:param float|None timeout:
@@ -356,6 +358,7 @@ def ask(
356358
allow_local_files=allow_local_files,
357359
save_diagnostics=save_diagnostics,
358360
question_uuid=question_uuid,
361+
parent_question_uuid=parent_question_uuid,
359362
push_endpoint=push_endpoint,
360363
asynchronous=asynchronous,
361364
timeout=timeout,
@@ -380,6 +383,7 @@ def ask(
380383
"datetime": "2024-04-11T10:46:48.236064",
381384
"uuid": "a9de11b1-e88f-43fa-b3a4-40a590c3443f",
382385
"question_uuid": question_uuid,
386+
"parent_question_uuid": parent_question_uuid,
383387
"forward_logs": subscribe_to_logs,
384388
"save_diagnostics": save_diagnostics,
385389
"order": 0,

0 commit comments

Comments
 (0)