Skip to content
Permalink
Browse files
AIRAVATA-3538 Fix issue with setting experimentDataDir
  • Loading branch information
machristie committed Nov 16, 2021
1 parent cbd94a4 commit a9977de23576b2c5e694a6da4ecb7024c87d1c0f
Showing 2 changed files with 12 additions and 8 deletions.
@@ -12,11 +12,15 @@

def launch(request, experiment_id):
if remoteapi.is_remote_api_configured():
remoteapi.call(request,
"/experiments/{experiment_id}/launch/",
path_params={"experiment_id": experiment_id},
base_url="/api",
method="post")
resp = remoteapi.call(request,
"/experiments/{experiment_id}/launch/",
path_params={"experiment_id": experiment_id},
base_url="/api",
method="post")
data = resp.json()
if not data["success"]:
logger.error(f"Failed to launch experiment {experiment_id}: {data['errorMessage']})")
raise Exception(data["errorMessage"])
return
else:
experiment = request.airavata_client.getExperiment(
@@ -71,15 +75,15 @@ def _set_storage_id_and_data_dir(request, experiment):
if not experiment.userConfigurationData.experimentDataDir:
project = request.airavata_client.getProject(
request.authz_token, experiment.projectId)
exp_dir = user_storage.create_user_dir(
_, exp_dir = user_storage.create_user_dir(
request,
dir_names=(project.name, experiment.experimentName),
create_unique=True)
experiment.userConfigurationData.experimentDataDir = exp_dir
else:
# create_user_dir will also validate that absolute paths are
# inside the user's storage directory
exp_dir = user_storage.create_user_dir(
_, exp_dir = user_storage.create_user_dir(
request,
path=experiment.userConfigurationData.experimentDataDir)
experiment.userConfigurationData.experimentDataDir = exp_dir
@@ -10,7 +10,7 @@ def read(fname):

setup(
name="airavata-django-portal-sdk",
version="1.3.dev1",
version="1.3.dev2",
url="https://github.com/apache/airavata-django-portal-sdk",
author="Apache Software Foundation",
author_email="dev@airavata.apache.org",

0 comments on commit a9977de

Please sign in to comment.