mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-05-12 17:04:48 +00:00
REPO-3335 Enterprise Docker and docker-compose simplified by pulling in transformer images
This commit is contained in:
parent
2d6fafaf1c
commit
8d338d1b55
@ -69,6 +69,7 @@ public class JodConverterSharedInstance implements InitializingBean, DisposableB
|
|||||||
// "${jodconverter.maxTasksPerProcess}" will be injected.
|
// "${jodconverter.maxTasksPerProcess}" will be injected.
|
||||||
|
|
||||||
private Integer maxTasksPerProcess;
|
private Integer maxTasksPerProcess;
|
||||||
|
private String url;
|
||||||
private String officeHome;
|
private String officeHome;
|
||||||
private int[] portNumbers;
|
private int[] portNumbers;
|
||||||
private Long taskExecutionTimeout;
|
private Long taskExecutionTimeout;
|
||||||
@ -90,6 +91,11 @@ public class JodConverterSharedInstance implements InitializingBean, DisposableB
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url)
|
||||||
|
{
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
public void setOfficeHome(String officeHome)
|
public void setOfficeHome(String officeHome)
|
||||||
{
|
{
|
||||||
this.officeHome = officeHome == null ? "" : officeHome.trim();
|
this.officeHome = officeHome == null ? "" : officeHome.trim();
|
||||||
@ -277,7 +283,7 @@ public class JodConverterSharedInstance implements InitializingBean, DisposableB
|
|||||||
*/
|
*/
|
||||||
public boolean isAvailable()
|
public boolean isAvailable()
|
||||||
{
|
{
|
||||||
final boolean result = isAvailable && officeManager != null;
|
final boolean result = isAvailable && (officeManager != null || (url != null && !url.isEmpty()));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,6 +314,7 @@ public class JodConverterSharedInstance implements InitializingBean, DisposableB
|
|||||||
logger.debug(" jodconverter.taskExecutionTimeout = " + taskExecutionTimeout);
|
logger.debug(" jodconverter.taskExecutionTimeout = " + taskExecutionTimeout);
|
||||||
logger.debug(" jodconverter.taskQueueTimeout = " + taskQueueTimeout);
|
logger.debug(" jodconverter.taskQueueTimeout = " + taskQueueTimeout);
|
||||||
logger.debug(" jodconverter.connectTimeout = " + connectTimeout);
|
logger.debug(" jodconverter.connectTimeout = " + connectTimeout);
|
||||||
|
logger.debug(" jodconverter.url = " + url);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only start the JodConverter instance(s) if the subsystem is enabled.
|
// Only start the JodConverter instance(s) if the subsystem is enabled.
|
||||||
@ -316,6 +323,9 @@ public class JodConverterSharedInstance implements InitializingBean, DisposableB
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (url == null || url.isEmpty())
|
||||||
|
{
|
||||||
|
|
||||||
logAllSofficeFilesUnderOfficeHome();
|
logAllSofficeFilesUnderOfficeHome();
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -325,7 +335,7 @@ public class JodConverterSharedInstance implements InitializingBean, DisposableB
|
|||||||
{
|
{
|
||||||
defaultOfficeMgrConfig.setMaxTasksPerProcess(maxTasksPerProcess);
|
defaultOfficeMgrConfig.setMaxTasksPerProcess(maxTasksPerProcess);
|
||||||
}
|
}
|
||||||
if (officeHome != null)
|
if (officeHome != null && officeHome.length() != 0)
|
||||||
{
|
{
|
||||||
defaultOfficeMgrConfig.setOfficeHome(officeHome);
|
defaultOfficeMgrConfig.setOfficeHome(officeHome);
|
||||||
}
|
}
|
||||||
@ -378,10 +388,11 @@ public class JodConverterSharedInstance implements InitializingBean, DisposableB
|
|||||||
if (logger.isErrorEnabled())
|
if (logger.isErrorEnabled())
|
||||||
{
|
{
|
||||||
logger.error("Unexpected error in configuring or starting the JodConverter library."
|
logger.error("Unexpected error in configuring or starting the JodConverter library."
|
||||||
+ "The following error is shown for informational purposes only.",x);
|
+ "The following error is shown for informational purposes only.", x);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If any exceptions are thrown in the above code, then isAvailable
|
// If any exceptions are thrown in the above code, then isAvailable
|
||||||
// should remain false, hence the return statements.
|
// should remain false, hence the return statements.
|
||||||
|
@ -2,6 +2,6 @@ spring.http.multipart.max-file-size=8192MB
|
|||||||
spring.http.multipart.max-request-size=8192MB
|
spring.http.multipart.max-request-size=8192MB
|
||||||
server.port = 8090
|
server.port = 8090
|
||||||
|
|
||||||
logging.level.org.alfresco.util.exec.RuntimeExec=debug
|
#logging.level.org.alfresco.util.exec.RuntimeExec=debug
|
||||||
logging.level.org.alfresco.transformer.LibreOfficeController=debug
|
#logging.level.org.alfresco.transformer.LibreOfficeController=debug
|
||||||
logging.level.org.alfresco.transformer.JodConverterSharedInstance=debug
|
#logging.level.org.alfresco.transformer.JodConverterSharedInstance=debug
|
Loading…
x
Reference in New Issue
Block a user