diff --git a/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java b/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java index 42ed6602072..41748ad91f1 100644 --- a/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java +++ b/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java @@ -4018,7 +4018,7 @@ public Response requestGlobusUpload(@Context ContainerRequestContext crc, @PathP case 400: return badRequest("Unable to grant permission"); case 409: - return conflict("Permission already exists"); + return conflict("Permission already exists or no more permissions allowed"); default: return error(null, "Unexpected error when granting permission"); } diff --git a/src/main/java/edu/harvard/iq/dataverse/globus/GlobusServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/globus/GlobusServiceBean.java index 59dad72b1d9..667b1750ef1 100644 --- a/src/main/java/edu/harvard/iq/dataverse/globus/GlobusServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/globus/GlobusServiceBean.java @@ -797,8 +797,8 @@ public void globusUpload(JsonObject jsonData, Dataset dataset, String httpReques String logFileName = System.getProperty("com.sun.aas.instanceRoot") + File.separator + "logs" + File.separator + "globus" + GlobusTaskInProgress.TaskType.UPLOAD + "_" - + logTimestamp + " " + dataset.getId() + "_" - + ".log"; + + logTimestamp + "_" + dataset.getId() + + ".log"; FileHandler fileHandler; try { @@ -1251,7 +1251,7 @@ public void globusDownload(JsonObject jsonObject, Dataset dataset, User authUser String logFileName = System.getProperty("com.sun.aas.instanceRoot") + File.separator + "logs" + File.separator + "globus" + GlobusTaskInProgress.TaskType.DOWNLOAD + "_" - + dataset.getId() + "_" + logTimestamp + + logTimestamp + "_" + dataset.getId() + ".log"; FileHandler fileHandler; boolean fileHandlerSuceeded; diff --git a/src/main/java/edu/harvard/iq/dataverse/globus/GlobusUtil.java b/src/main/java/edu/harvard/iq/dataverse/globus/GlobusUtil.java index aca1de3071e..0665893136b 100644 --- a/src/main/java/edu/harvard/iq/dataverse/globus/GlobusUtil.java +++ b/src/main/java/edu/harvard/iq/dataverse/globus/GlobusUtil.java @@ -40,14 +40,20 @@ public static boolean isTaskCompleted(GlobusTaskState task) { // that it's a Globus issue on the endnode side, that is // in fact recoverable; should we add it to the list here? // @todo: I'm tempted to just take "ACTIVE" for face value, - // and ALWAYS assume that it's still ongoing. - if (task.getNice_status().equalsIgnoreCase("ok") - || task.getNice_status().equalsIgnoreCase("queued")) { + // and ALWAYS assume that the task is still ongoing. + /*if (task.getNice_status().equalsIgnoreCase("ok") + || task.getNice_status().equalsIgnoreCase("queued")) {*/ return false; - } + // further @todo: maybe only use this "strict" interpretation + // of what "ACTIVE" means when the "experimental" (async.) + // monitoring mode is enabled? + /*}*/ } } } + // @todo: if either task, or status is null - it may indicate that there + // was an error contacting the task management api, not that it has + // completed one way or another - ? return true; }