Skip to content

Commit 9f5e379

Browse files
committed
adding flowcept and IO for swift/t
1 parent 4ce89e2 commit 9f5e379

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

wfcommons/wfbench/translator/swift_t.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def translate(self, output_folder: pathlib.Path) -> None:
7676
in_count = 0
7777
self.output_folder = output_folder
7878
self.cpu_benchmark = output_folder.joinpath("./bin/cpu-benchmark").absolute()
79-
self.script = f"string fs = sprintf(flowcept_start, \"{self.workflow.workflow_id}\");\nstring fss = python_persist(fs);\n\n" if self.workflow.workflow_id else ""
79+
self.script = f"string fs = sprintf(flowcept_start, \"{self.workflow.workflow_id}\", \"{self.workflow.name}\");\nstring fss = python_persist(fs);\n\n" if self.workflow.workflow_id else ""
8080
self.script += "string root_in_files[];\n"
8181

8282
for task_name in self.root_task_names:

wfcommons/wfbench/translator/templates/swift_t_templates/workflow.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ global const string flowcept_start =
88
"""
99
workflow_id = "%s"
1010
from flowcept.flowcept_api.flowcept_controller import Flowcept
11-
flowcept_agent = Flowcept(workflow_id=workflow_id, workflow_name="Blast-Benchmark", bundle_exec_id=workflow_id)
11+
flowcept_agent = Flowcept(workflow_id=workflow_id, workflow_name="%s", bundle_exec_id=workflow_id)
1212
flowcept_agent.start()
1313
"""
1414

@@ -43,11 +43,11 @@ workflow_id = "%s"
4343
if 'workflow_id':
4444
logging.info("Running with Flowcept.")
4545
from flowcept import Flowcept, FlowceptTask
46-
fc = Flowcept(workflow_id=args.workflow_id,
47-
bundle_exec_id=args.workflow_id,
46+
fc = Flowcept(workflow_id=workflow_id,
47+
bundle_exec_id=workflow_id,
4848
start_persistence=False, save_workflow=False)
4949
fc.start()
50-
fc_task = FlowceptTask(workflow_id=args.workflow_id, used={
50+
fc_task = FlowceptTask(workflow_id=workflow_id, used={
5151
'workflow_id': workflow_id
5252
})
5353

0 commit comments

Comments
 (0)