Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions hello_nexus/handler/service_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

from __future__ import annotations

import uuid

import nexusrpc
from temporalio import nexus

Expand Down Expand Up @@ -33,7 +31,7 @@ async def my_workflow_run_operation(
return await ctx.start_workflow(
WorkflowStartedByNexusOperation.run,
input,
id=str(uuid.uuid4()),
id=f"greeting-for-{input.name}",
)

# This is a Nexus operation that responds synchronously to all requests. That means
Expand Down
4 changes: 1 addition & 3 deletions nexus_multiple_args/handler/service_handler.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from __future__ import annotations

import uuid

import nexusrpc
from temporalio import nexus

Expand Down Expand Up @@ -32,7 +30,7 @@ async def hello(
input.name, # First argument: name
input.language, # Second argument: language
],
id=str(uuid.uuid4()),
id=f"hello-{input.name}-in-{input.language}",
)


Expand Down
6 changes: 3 additions & 3 deletions nexus_sync_operations/caller/app.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import asyncio
import uuid
from typing import Optional

from temporalio.client import Client
from temporalio.worker import Worker

from nexus_sync_operations.caller.workflows import CallerWorkflow
from nexus_sync_operations.caller.workflows import CallerWorkflow, NEXUS_ENDPOINT

NAMESPACE = "nexus-sync-operations-caller-namespace"
TASK_QUEUE = "nexus-sync-operations-caller-task-queue"
Expand All @@ -24,9 +23,10 @@ async def execute_caller_workflow(
task_queue=TASK_QUEUE,
workflows=[CallerWorkflow],
):
workflow_id = f"{NEXUS_ENDPOINT}-caller"
log = await client.execute_workflow(
CallerWorkflow.run,
id=str(uuid.uuid4()),
id=workflow_id,
task_queue=TASK_QUEUE,
)
for line in log:
Expand Down
Loading