use of bio.terra.service.resourcemanagement.exception.BucketLockException in project jade-data-repo by DataBiosphere.
the class IngestFilePrimaryDataLocationStep method doStep.
@Override
public StepResult doStep(FlightContext context) throws InterruptedException {
FlightMap workingMap = context.getWorkingMap();
Boolean loadComplete = workingMap.get(FileMapKeys.LOAD_COMPLETED, Boolean.class);
if (loadComplete == null || !loadComplete) {
try {
GoogleBucketResource bucketForFile = locationService.getOrCreateBucketForFile(profileId, context.getFlightId());
workingMap.put(FileMapKeys.BUCKET_INFO, bucketForFile);
} catch (BucketLockException blEx) {
return new StepResult(StepStatus.STEP_RESULT_FAILURE_RETRY, blEx);
}
}
return StepResult.getStepResultSuccess();
}
Aggregations