Skip to content
Merged
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
2 changes: 1 addition & 1 deletion custom_metric/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async def execute_activity(self, input: ExecuteActivityInput):
unit="duration",
)
histogram.record(
schedule_to_start, {"workflow_type": activity.info().workflow_type}
schedule_to_start, {"workflow_type": activity.info().workflow_type or ""}
)
return await self.next.execute_activity(input)

Expand Down
2 changes: 1 addition & 1 deletion polling/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from temporalio import activity
from temporalio.exceptions import ApplicationError, ApplicationErrorCategory

attempts = Counter[str]()
attempts = Counter[str | None]()
ERROR_ATTEMPTS = 5


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [{ name = "Temporal Technologies Inc", email = "sdk@temporal.io" }]
requires-python = ">=3.10"
readme = "README.md"
license = "MIT"
dependencies = ["temporalio>=1.22.0,<2"]
dependencies = ["temporalio>=1.23.0,<2"]

[project.urls]
Homepage = "https://github.com/temporalio/samples-python"
Expand Down
2 changes: 1 addition & 1 deletion tests/resource_pool/workflow_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def test_resource_pool_workflow(client: Client):
# Mock out the activity to count executions
@activity.defn(name="use_resource")
async def use_resource_mock(input: UseResourceActivityInput) -> None:
workflow_id = activity.info().workflow_id
workflow_id = activity.info().workflow_id or ""
resource_usage[input.resource].append((workflow_id, "start"))
# We need a small sleep here to bait out races
await asyncio.sleep(0.05)
Expand Down
Loading
Loading