soe-ai 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
soe/broker.py CHANGED
@@ -1,7 +1,6 @@
1
1
  from uuid import uuid4
2
- from typing import Dict, List, Any, Union, Callable, Optional
3
- from .types import Backends, BroadcastSignalsCaller
4
- from .local_backends import EventTypes
2
+ from typing import Dict, List, Any, Union, Optional
3
+ from .types import Backends, BroadcastSignalsCaller, NodeCaller, EventTypes, WorkflowValidationError
5
4
  from .lib.register_event import register_event
6
5
  from .lib.yaml_parser import parse_yaml
7
6
  from .lib.operational import add_operational_state
@@ -131,7 +130,7 @@ def orchestrate(
131
130
  def broadcast_signals(
132
131
  id: str,
133
132
  signals: List[str],
134
- nodes: Dict[str, Callable[[str, Dict[str, Any]], None]],
133
+ nodes: Dict[str, NodeCaller],
135
134
  backends: Backends,
136
135
  ) -> None:
137
136
  """Broadcast signals to matching nodes in the current workflow"""
@@ -139,7 +138,7 @@ def broadcast_signals(
139
138
 
140
139
  register_event(backends, id, EventTypes.SIGNALS_BROADCAST, {"signals": signals})
141
140
 
142
- workflows_registry = backends.workflow.soe_get_workflows_registry(id)
141
+ workflows_registry = backends.workflow.get_workflows_registry(id)
143
142
 
144
143
  workflow_name = backends.workflow.get_current_workflow_name(id)
145
144
  workflow = workflows_registry.get(workflow_name, {})