Skip to content

Commit a9f40dd

Browse files
committed
swift/t with flowcept
1 parent c2826c6 commit a9f40dd

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

wfcommons/wfbench/translator/swift_t.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,10 @@ def translate(self, output_folder: pathlib.Path) -> None:
100100
for category in self.categories_list:
101101
self._add_tasks(category)
102102

103-
# flowcept stop
104-
# if self.workflow.workflow_id:
105-
# self.script += "string fss = sprintf(flowcept_stop);\npython_persist(fss);"
103+
# flowcept end
104+
if self.workflow.workflow_id:
105+
self.script += f"string fc_stop = sprintf(flowcept_stop, dep_{self.cmd_counter - 1});\n" \
106+
"python_persist(fc_stop);"
106107

107108
run_workflow_code = self._merge_codelines("templates/swift_t_templates/workflow.swift", self.script)
108109

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ except Exception:
1717
traceback.print_exc()
1818
""";
1919

20+
global const string flowcept_stop =
21+
"""
22+
import time
23+
dep = %i
24+
time.sleep(240)
25+
""";
26+
2027
string command =
2128
"""
2229
import logging

0 commit comments

Comments
 (0)