Skip to content
Snippets Groups Projects
Commit a5a1094b authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

fixing subspace file creation

parent 3f4361ea
No related branches found
No related tags found
1 merge request!510fixing subspace file creation
Pipeline #2923 passed
......@@ -33,6 +33,7 @@ class CapoInjector:
if RemoteProcessingSites.NAASC.value in self.request.argument:
system = current.split("-")[1]
remote_profile = "naasc-" + system
logger.info(f"profile for request: {remote_profile}")
return remote_profile
return current
......@@ -94,10 +95,10 @@ class CapoInjector:
path = self.dir_path / subspace.filename
path.write_bytes(subspace.content)
logger.info(f"Writing capo subspace file to {self.dir_path}")
logger.info(f"Writing capo subspace file to {self.dir_path.__str__()}")
def clear_subspace(self):
logger.info(f"Clearing capo subspace file from {self.dir_path}...")
logger.info(f"Clearing capo subspace file from {self.dir_path.__str__()}...")
for file in os.listdir(self.dir_path):
if file.endswith(".properties"):
Path.unlink(self.dir_path / file)
......
......@@ -220,14 +220,14 @@ class WorkflowService(WorkflowServiceIF):
logger.info("Looking up workflow %s", request.workflow_name)
definition = self.info.lookup_workflow_definition(request.workflow_name)
# Is this a remote execution workflow?
injector = CapoInjector(request)
remote = injector.is_remote_workflow()
# create a temporary directory if processing directory is not supplied,
# needs to exist before template rendering
temp_folder = self._make_temp_directory(request) if not request.results_dir else Path(request.results_dir)
# Is this a remote execution workflow?
injector = CapoInjector(request)
remote = injector.is_remote_workflow()
# if remote is true, create a capo subspace file in the request's directory
if remote:
logger.info("Creating Subspace File...")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment