-
Type: Improvement
-
Status: Done
-
Priority: Medium
-
Resolution: Done
-
Affects Version/s: 1.20.1
-
Fix Version/s: 1.21.0
-
Component/s: appng-appngizer, appng-core
-
Labels:
uploading an application via appNGizer currently (re)loads the entire Reposity and ready the new Package from there. But this reload may take some time (see also APPNG-2296) or is not needed by the client.
To confirm that the Package was uploaded successfully, it is sufficient to check the PackageArchive.
current 1.20.1:
org.appng.appngizer.controller.RepositoryController 267ff File outFile = new File(new File(r.getUri()), file.getOriginalFilename()); FileUtils.writeByteArrayToFile(outFile, file.getBytes()); PackageArchive packageArchive = RepositoryUtils.getPackage(r, outFile, file.getOriginalFilename()); if (null != packageArchive) { RepositoryCacheFactory.instance().getCache(r).reload(); PackageInfo packageInfo = packageArchive.getPackageInfo(); return getRepositoryPackage(name, packageInfo.getName(), packageInfo.getVersion(), packageInfo.getTimestamp()); } else { FileUtils.deleteQuietly(outFile); return reply(HttpStatus.BAD_REQUEST); }
no reload:
org.appng.appngizer.controller.RepositoryController 267ff File outFile = new File(new File(r.getUri()), file.getOriginalFilename()); FileUtils.writeByteArrayToFile(outFile, file.getBytes()); PackageArchive packageArchive = RepositoryUtils.getPackage(r, outFile, file.getOriginalFilename()); if (null != packageArchive) { Identifier installedApp = getApplicationByName(packageArchive.getPackageInfo().getName()); Identifier installedTemplate = templateService.getTemplateByName(packageArchive.getPackageInfo().getName()); Package pkg = getPackage(installedApp, installedTemplate, packageArchive.getPackageInfo()); return ok(pkg); } else { FileUtils.deleteQuietly(outFile); return reply(HttpStatus.BAD_REQUEST); }
- relates to
-
APPNG-2296 Parallelize init/update of RepositoryCacheFilesystem
- Done