mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-08-14 17:58:27 +00:00
REPO-3439 LibreOffice now only creates the jodconverter on the 1st request so the correct timeout is used.
This commit is contained in:
@@ -71,11 +71,14 @@ public class LibreOfficeController extends AbstractTransformerController
|
|||||||
logEnterpriseLicenseMessage();
|
logEnterpriseLicenseMessage();
|
||||||
logger.info("This transformer uses LibreOffice from The Document Foundation. See the license at https://www.libreoffice.org/download/license/ or in /libreoffice.txt");
|
logger.info("This transformer uses LibreOffice from The Document Foundation. See the license at https://www.libreoffice.org/download/license/ or in /libreoffice.txt");
|
||||||
logger.info("-------------------------------------------------------------------------------------------------------------------------------------------------------");
|
logger.info("-------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
|
|
||||||
|
// TODO Remove this when we are happy that creating the jodconverter on the first transform is okay.
|
||||||
|
// setJodConverter(createJodConverter(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static JodConverter createJodConverter(Long taskExecutionTimeout)
|
private static JodConverter createJodConverter(Long taskExecutionTimeout)
|
||||||
{
|
{
|
||||||
String timeout = taskExecutionTimeout <= 0 ? "120000" : taskExecutionTimeout.toString();
|
String timeout = taskExecutionTimeout == null || taskExecutionTimeout <= 0 ? "120000" : taskExecutionTimeout.toString();
|
||||||
|
|
||||||
JodConverterSharedInstance jodconverter = new JodConverterSharedInstance();
|
JodConverterSharedInstance jodconverter = new JodConverterSharedInstance();
|
||||||
|
|
||||||
@@ -119,12 +122,11 @@ public class LibreOfficeController extends AbstractTransformerController
|
|||||||
@Override
|
@Override
|
||||||
protected String version()
|
protected String version()
|
||||||
{
|
{
|
||||||
// This method is simply used to check the availability in the case of LibreOffice.
|
// TODO Remove this when we are happy that creating the jodconverter on the first transform is okay.
|
||||||
if (!jodconverter.isAvailable())
|
// if (!jodconverter.isAvailable())
|
||||||
{
|
// {
|
||||||
throw new TransformException(500, "LibreOffice is not yet available");
|
// throw new TransformException(500, "LibreOffice is not yet available");
|
||||||
}
|
// }
|
||||||
|
|
||||||
return "LibreOffice available";
|
return "LibreOffice available";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user