Skip to content

Commit 0b71722

Browse files
committed
Formatting
1 parent 3262496 commit 0b71722

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

eager_wf_start/activities.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from temporalio import activity
22

3+
34
@activity.defn()
45
async def greeting(name: str) -> str:
5-
return f"Hello {name}!"
6+
return f"Hello {name}!"

eager_wf_start/run.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
TASK_QUEUE = "eager-wf-start-task-queue"
1111

12+
1213
async def main():
13-
14+
1415
# Note that the worker and client run in the same process and share the same client connection.
1516
client = await Client.connect("localhost:7233")
1617
worker = Worker(
@@ -30,7 +31,7 @@ async def main():
3031
task_queue=TASK_QUEUE,
3132
request_eager_start=True,
3233
)
33-
34+
3435
# This is an internal flag not intended to be used publicly.
3536
# It is used here purely to display that the workflow was eagerly started.
3637
print(f"Workflow eagerly started: {wf_handle.__temporal_eagerly_started}")

tests/eager_wf_start/workflow_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
from temporalio.client import Client
44
from temporalio.worker import Worker
55

6-
from eager_wf_start.workflows import EagerWorkflow
76
from eager_wf_start.activities import greeting
7+
from eager_wf_start.workflows import EagerWorkflow
8+
89

910
async def test_eager_wf_start(client: Client):
1011
task_queue_name = str(uuid.uuid4())
@@ -25,4 +26,4 @@ async def test_eager_wf_start(client: Client):
2526
print("HANDLE", handle.__temporal_eagerly_started)
2627
assert handle.__temporal_eagerly_started
2728
result = await handle.result()
28-
assert result == "Hello Temporal!"
29+
assert result == "Hello Temporal!"

0 commit comments

Comments
 (0)