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.
|
||||
|
||||
private Integer maxTasksPerProcess;
|
||||
private String url;
|
||||
private String officeHome;
|
||||
private int[] portNumbers;
|
||||
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)
|
||||
{
|
||||
this.officeHome = officeHome == null ? "" : officeHome.trim();
|
||||
@ -277,7 +283,7 @@ public class JodConverterSharedInstance implements InitializingBean, DisposableB
|
||||
*/
|
||||
public boolean isAvailable()
|
||||
{
|
||||
final boolean result = isAvailable && officeManager != null;
|
||||
final boolean result = isAvailable && (officeManager != null || (url != null && !url.isEmpty()));
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -308,6 +314,7 @@ public class JodConverterSharedInstance implements InitializingBean, DisposableB
|
||||
logger.debug(" jodconverter.taskExecutionTimeout = " + taskExecutionTimeout);
|
||||
logger.debug(" jodconverter.taskQueueTimeout = " + taskQueueTimeout);
|
||||
logger.debug(" jodconverter.connectTimeout = " + connectTimeout);
|
||||
logger.debug(" jodconverter.url = " + url);
|
||||
}
|
||||
|
||||
// Only start the JodConverter instance(s) if the subsystem is enabled.
|
||||
@ -316,6 +323,9 @@ public class JodConverterSharedInstance implements InitializingBean, DisposableB
|
||||
return;
|
||||
}
|
||||
|
||||
if (url == null || url.isEmpty())
|
||||
{
|
||||
|
||||
logAllSofficeFilesUnderOfficeHome();
|
||||
|
||||
try
|
||||
@ -325,7 +335,7 @@ public class JodConverterSharedInstance implements InitializingBean, DisposableB
|
||||
{
|
||||
defaultOfficeMgrConfig.setMaxTasksPerProcess(maxTasksPerProcess);
|
||||
}
|
||||
if (officeHome != null)
|
||||
if (officeHome != null && officeHome.length() != 0)
|
||||
{
|
||||
defaultOfficeMgrConfig.setOfficeHome(officeHome);
|
||||
}
|
||||
@ -382,6 +392,7 @@ public class JodConverterSharedInstance implements InitializingBean, DisposableB
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If any exceptions are thrown in the above code, then isAvailable
|
||||
// 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
|
||||
server.port = 8090
|
||||
|
||||
logging.level.org.alfresco.util.exec.RuntimeExec=debug
|
||||
logging.level.org.alfresco.transformer.LibreOfficeController=debug
|
||||
logging.level.org.alfresco.transformer.JodConverterSharedInstance=debug
|
||||
#logging.level.org.alfresco.util.exec.RuntimeExec=debug
|
||||
#logging.level.org.alfresco.transformer.LibreOfficeController=debug
|
||||
#logging.level.org.alfresco.transformer.JodConverterSharedInstance=debug
|
Loading…
x
Reference in New Issue
Block a user