Skip to content

Commit

Permalink
Fixups / lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Dec 9, 2024
1 parent 3b933d1 commit a7c2d3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions message_passing/safe_message_handlers/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@ def __init__(self, input: ClusterManagerInput) -> None:
self.state = ClusterManagerState()

if input.test_continue_as_new:
self.max_history_length = 120
self.max_history_length: Optional[int] = 120
self.sleep_interval_seconds = 1
else:
self.max_history_length = None
self.sleep_interval_seconds = 600

# Protects workflow state from interleaved access
self.nodes_lock = asyncio.Lock()
self.max_history_length: Optional[int] = None
self.sleep_interval_seconds: int = 600

@workflow.update
async def wait_until_cluster_started(self) -> ClusterManagerState:
Expand Down
3 changes: 2 additions & 1 deletion tests/message_passing/safe_message_handlers/workflow_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import asyncio
import uuid
from typing import Callable, Sequence

import pytest
from temporalio.client import Client, WorkflowUpdateFailedError
Expand All @@ -20,7 +21,7 @@
ClusterManagerWorkflow,
)

ACTIVITIES = [
ACTIVITIES: Sequence[Callable] = [
assign_nodes_to_job,
unassign_nodes_for_job,
find_bad_nodes,
Expand Down

0 comments on commit a7c2d3b

Please sign in to comment.