Skip to content

Commit ef8fd98

Browse files
committed
Fix: Script generation for pyflow resource
1 parent 7ab51b7 commit ef8fd98

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

pyflow/nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,8 +1076,8 @@ def deploy_suite(self, target=FileSystem, **options):
10761076

10771077
target = target(self, **options)
10781078
for t in self.all_tasks:
1079-
script, includes = t.generate_script()
1080-
target.deploy_task(t.deploy_path, script, includes)
1079+
script, includes = t.generate_script()
1080+
target.deploy_task(t.deploy_path, script, includes)
10811081
for f in self.all_families:
10821082
manual = self.generate_stub(f.manual)
10831083
if manual:

pyflow/resource.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def get_resource(self, filename):
8080

8181
return []
8282

83-
def install_file_stub(self, target):
83+
def set_server_filename(self, files_install_path=None):
8484
"""
8585
Installs any data associated with the resource object that is going to be deployed from the **ecFlow** server.
8686
@@ -95,15 +95,17 @@ def install_file_stub(self, target):
9595
assert self.fullname.count("/") > 1
9696
subpath = self.fullname[self.fullname.find("/", 1) + 1 :]
9797

98-
self._server_filename = os.path.join(
99-
target.files_install_path(), subpath, self.name
100-
)
101-
102-
super().install_file_stub(target)
98+
if files_install_path is None:
99+
self._server_filename = os.path.join(
100+
subpath, self.name
101+
)
102+
else:
103+
self._server_filename = os.path.join(
104+
files_install_path, self.fullname
105+
)
103106

104-
self.save_data(target, self._server_filename)
105107

106-
def build_script(self):
108+
def generate_script(self):
107109
"""
108110
Returns the installer script for the data resource.
109111
@@ -128,7 +130,7 @@ def build_script(self):
128130
for h in self._hosts:
129131
lines += h.copy_file_to(self._server_filename, self.location()).split("\n")
130132

131-
return lines
133+
return lines, []
132134

133135
def location(self):
134136
"""

0 commit comments

Comments
 (0)