Skip to content

Commit

Permalink
Merge pull request #95 from panregedit:hotfix/v0.2.0/worker_concurrency
Browse files Browse the repository at this point in the history
Hotfix/v0.2.0/worker_concurrency
  • Loading branch information
panregedit authored Nov 22, 2024
2 parents 4fbb2be + 451d994 commit fbd3143
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,14 @@ def start_workflow_by_name(
name: str,
input: dict[str, object],
version: Optional[int] = None,
correlationId: Optional[str] = None,
priority: Optional[int] = None,
**kwargs
) -> str:
kwargs = {}
if version:
kwargs.update({"version": version})
if correlationId:
kwargs.update({"correlation_id": correlationId})
if priority:
kwargs.update({"priority": priority})

return self.workflowResourceApi.start_workflow1(input, name, **kwargs)
start_workflow_request = StartWorkflowRequest(name=name,
version=version,
input=input,
**kwargs)

return self.start_workflow(start_workflow_request)

def start_workflow(self, start_workflow_request: StartWorkflowRequest) -> str:
return self.workflowResourceApi.start_workflow(start_workflow_request)
Expand Down
2 changes: 1 addition & 1 deletion omagent-core/src/omagent_core/engine/worker/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def workflow_instance_id(self, value: str):
self._workflow_instance_id = value

@abstractmethod
def _run(self, workflow_instance_id, *args, **kwargs) -> Any:
def _run(self, *args, **kwargs) -> Any:
"""Run the Node."""

def execute(self, task: Task) -> TaskResult:
Expand Down

0 comments on commit fbd3143

Please sign in to comment.